home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-08-19 | 169.8 KB | 6,698 lines |
- *** ../mh-6.8/Patchlevel Tue Dec 15 08:52:42 1992
- --- Patchlevel Thu Aug 19 16:46:19 1993
- ***************
- *** 1 ****
- ! MH.6.8 patch.0
- --- 1 ----
- ! MH.6.8 patch.1
- *** ../mh-6.8/papers/changes/mh-changes.ms Tue Dec 15 08:54:32 1992
- --- papers/changes/mh-changes.ms Fri Aug 20 10:11:06 1993
- ***************
- *** 1,2 ****
- ! .\" @(#)$Id: mh-changes.ms,v 1.25 1992/12/15 00:25:33 jromine Exp $
- .\" Standard -ms macros
- --- 1,2 ----
- ! .\" @(#)$Id: mh-changes.ms,v 1.26 1993/08/20 17:11:02 jromine Exp $
- .\" Standard -ms macros
- ***************
- *** 6,8 ****
- .\" remember to update date in text below
- ! .DA "December 14, 1992"
- .if n \{\
- --- 6,8 ----
- .\" remember to update date in text below
- ! .DA "August 20, 1993"
- .if n \{\
- ***************
- *** 30,31 ****
- --- 30,32 ----
- Irvine, CA 92717\-3425
- + Bug-MH@ICS.UCI.EDU
- .AB
- ***************
- *** 98,99 ****
- --- 99,161 ----
- .KE
- + .ds LH Changes for MH 6.8.1
- + .bp
- + .SH
- + CHANGES FOR MH 6.8.1
- + .LP
- + The MH.6.8.1 patch release is a maintenance
- + release.
- + This is the current released version of \fIMH\fP
- + as of August 20, 1993.
- + .PP
- + This release includes a small number
- + of bug fixes, a few minor enhancements, some changes
- + for the new MIME standard, and support for ESMTP (RFC 1425).
- + Support for BSD 4.4 and 386BSD is planned for the next
- + release.
- + .PP
- + Many other fixes which have already been received
- + are still being merged.
- + If you've sent an update for MH 6.8 to \fBBug-MH@ics.uci.edu\fP
- + and it isn't in this release,
- + it'll probably appear in the next release.
- + .SH
- + Fixes and Enhancements
- + .LP
- + Many minor documentation corrections were made.
- + There are also a few program changes:
- + .IP mhn \w'post'u+2n
- + The `\-cache\0policy', `\-\[no\]check', and `\-\[no\]pause'
- + switches have been added. Some other minor changes have
- + been made to comply with the new MIME standard.
- + See \fImhn\fP\|(1) for complete details.
- + .IP post
- + When posting mail with SendMail, \fIpost\fP will
- + not use the \fBONEX\fP command when it is posting
- + a message with BCCs.
- + .IP scan
- + \fIscan\fP will now work with big width values.
- + .SH
- + Format Strings
- + .LP
- + One new function has been added:
- + .IP "%(profile arg)" \w'XXprofileXargX'u+2n
- + This function looks up a component in the
- + \fB\&.mh\(ruprofile\fR or \fBcontext\fP files
- + and returns the value of that component.
- + .SH
- + Configuration
- + .LP
- + Two new configuration options are present:
- + .IP GCOS_HACK \w'NORUSERPASS'u+2n
- + The so-called \*(lqgcos\*(rq field of the password file is
- + used as a last resort
- + to find the user's full name (see \fImh-profile\fP\|(5) for details).
- + Enable this option
- + if your \fIpasswd\fP\|(5) man page notes that the `&'
- + character in the \*(lqgcos\*(rq field stands for the login name.
- + .IP NORUSERPASS
- + Tells \fIMH\fR that your system doesn't have the
- + \fIruserpass\fP\|(3) routine;
- + \fIMH\fR will include its own copy of this
- + routine in its library.
- .ds LH Changes for MH 6.8
- ***************
- *** 100,101 ****
- --- 162,164 ----
- .bp
- + .ds CF December 14, 1992
- .SH
- *** ../mh-6.8/conf/mh-gen.8 Tue Dec 15 08:53:15 1992
- --- conf/mh-gen.8 Fri Aug 20 12:48:02 1993
- ***************
- *** 1,2 ****
- ! .\" @(#)$Id: mh-gen.8,v 2.105 1992/12/14 17:19:19 jromine Exp $
- .\" uneven inter-word spacing (nroff line adjusting) hampers readability
- --- 1,2 ----
- ! .\" @(#)$Id: mh-gen.8,v 2.111 1993/08/20 19:47:56 jromine Exp $
- .\" uneven inter-word spacing (nroff line adjusting) hampers readability
- ***************
- *** 3,5 ****
- .if n .na
- ! .TH MH-GEN 8 MH.6.8 [mh.6]
- .SH NAME
- --- 3,5 ----
- .if n .na
- ! .TH MH-GEN 8 MH.6.8.1 [mh.6]
- .SH NAME
- ***************
- *** 194,195 ****
- --- 194,196 ----
- or \*(lqstandard\*(rq to install manual entries under \fBman?/\fR,
- + or \*(lqbsd44\*(rq to install manual entries as \fBman?/\fIpage\fP.0\fR,
- or \*(lqgen\*(rq to generate but not install them,
- ***************
- *** 196,197 ****
- --- 197,204 ----
- or \*(lqnone\*(rq to neither generate nor install them.
- +
- + Any of these values may have the suffix \*(lq/cat\*(rq appended
- + to it. In that case, the manual entries will be formatted
- + with \*(lqnroff -man\*(rq and they will be installed in the
- + corresponding \*(lqcat?\*(rq directories.
- +
- For example,
- ***************
- *** 199,200 ****
- --- 206,211 ----
- use \*(lqstandard\*(rq and \fB/usr/man/u_man\fR for \*(lqmandir\*(rq.
- + To install formatted manual entires under \fB/usr/contrib/man/cat?\fR,
- + use \*(lqstandard/cat\*(rq and \fB/usr/contrib/man\fR for \*(lqmandir\*(rq.
- + To install formatted manual entries using the BSD44 convention,
- + use \*(lqbsd44/cat\*(rq.
-
- ***************
- *** 648,650 ****
- Use on Berkeley UNIX systems on or after 4.4BSD.
- ! This code is still under development.
-
- --- 659,662 ----
- Use on Berkeley UNIX systems on or after 4.4BSD.
- ! Also, be sure to use \*(lqoptions BSD43\*(rq
- ! and \*(lqoptions BSD42\*(rq.
-
- ***************
- *** 664,665 ****
- --- 676,687 ----
-
- + .ti -.5in
- + GCOS_HACK
- + .br
- + The so-called \*(lqgcos\*(rq field of the password file is
- + used as a last resort
- + to find the user's full name (see \fImh-profile\fP\|(5) for details).
- + Enable this option
- + if your \fIpasswd\fP\|(5) man page notes that the `&'
- + character in the \*(lqgcos\*(rq field stands for the login name.
- +
- .ti -.5i
- ***************
- *** 725,727 ****
- If you get an undefined symbol \*(lqruserpass\*(rq when compiling
- ! \fIMH\fP, you need this option. If, however, you include this
- option and get an undefined symbol \*(lq\(ru\^\(ruruserpass\*(rq
- --- 747,749 ----
- If you get an undefined symbol \*(lqruserpass\*(rq when compiling
- ! \fIMH\fP, you probably need this option. If, however, you include this
- option and get an undefined symbol \*(lq\(ru\^\(ruruserpass\*(rq
- ***************
- *** 728,729 ****
- --- 750,752 ----
- when compiling, then you should omit this option.
- + (See also `NORUSERPASS'.)
-
- ***************
- *** 736,737 ****
- --- 759,769 ----
- .ti -.5i
- + NORUSERPASS
- + .br
- + Tells \fIMH\fR that your system doesn't have the
- + \fIruserpass\fP\|(3) routine;
- + \fIMH\fR will include its own copy of this
- + routine in its library.
- + (See also `NFS'.)
- +
- + .ti -.5i
- NTOHLSWAP
- ***************
- *** 760,761 ****
- --- 792,804 ----
-
- + .\" .ti -.5i
- + .\" SMTP_ONEX
- + .\" .br
- + .\" Causes \fIMH\fP to give the \*(lqONEX\*(rq SMTP command
- + .\" when posting mail (a SendMail performance hack).
- + .\" Useful only if you're running a SendMail
- + .\" which will successfully reset with the \*(lqRSET\*(rq command
- + .\" after seeing the \*(lqONEX\*(rq command;
- + .\" otherwise, if you enable this
- + .\" you may have problems posting messages with \*(lqBCCs\*(rq.
- + .\"
- .ti -.5i
- *** ../mh-6.8/conf/mhconfig.c Tue Dec 15 08:53:16 1992
- --- conf/mhconfig.c Fri Aug 20 12:47:50 1993
- ***************
- *** 1,7 ****
- /* mhconfig.c - configure MH */
- /* cc [-DSYS5] mhconfig.c -o mhconfig */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mhconfig.c,v 2.63 1992/12/02 19:08:03 jromine Exp $";
- #endif /* lint */
-
- #include <ctype.h>
- --- 1,7 ----
- /* mhconfig.c - configure MH */
- /* cc [-DSYS5] mhconfig.c -o mhconfig */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mhconfig.c,v 2.69 1993/08/20 19:47:46 jromine Exp $";
- #endif /* lint */
-
- #include <ctype.h>
- ***************
- *** 29,35 ****
- #define MAKE "../%s/Makefile"
-
- #define WARNING "This file is automatically generated. Do not edit!"
- ! #define MHRELEASE "6.8" /* for version: "Maj.min.pat" */
- #define MHCENTERFOOT "MH.6.8" /* for nroff page footers */
- #define MHLEFTFOOT "[mh.6]" /* [mh.6] MH.6.6 page# */
- #define MHSLIBVER "3.2" /* SunOS4 shared library version */
- --- 29,35 ----
- #define MAKE "../%s/Makefile"
-
- #define WARNING "This file is automatically generated. Do not edit!"
- ! #define MHRELEASE "6.8.1" /* for version: "Maj.min.pat" */
- #define MHCENTERFOOT "MH.6.8" /* for nroff page footers */
- #define MHLEFTFOOT "[mh.6]" /* [mh.6] MH.6.6 page# */
- #define MHSLIBVER "3.2" /* SunOS4 shared library version */
- ***************
- *** 76,81 ****
- --- 76,82 ----
- static char *mailpath = "/usr/spool/mail";
- static char *maildir = NULL;
- static char *mailfile = NULL;
- + static char *mancat = "man";
- static char *mandir = "/usr/man";
- static char *manuals = "standard";
- static char *mf = "off";
- ***************
- *** 136,141 ****
- --- 137,143 ----
- "MIME", 0, /* multi-media extensions */
- "MPOP", 0, /* mobile pop */
- "MSGID", 0, /* slocal dup surpression */
- + "NORUSERPASS", 0, /* no ruserpass(3) */
- "TMA", 0, /* trusted mail */
- "TTYD", 0,
- "UCI", 0,
- ***************
- *** 336,355 ****
- maildir ? maildir : "/usr/spool/mail");
-
- fprintf (fp, "s%%@(MHMANDIR)%%%s%%g\n", mandir);
- if (strcmp (manuals, "standard") == 0 || strcmp (manuals, "gen") == 0)
- for (i = 1; i <= 8; i++) {
- ! fprintf (fp, "s%%@(MHMANDIR%d)%%man%d%%g\n", i, i);
- fprintf (fp, "s%%@(MHMANEXT%d)%%%d%%g\n", i, i);
- }
- else
- for (i = 1; i <= 8; i++) {
- ! fprintf (fp, "s%%@(MHMANDIR%d)%%man%c%%g\n", i,
- strcmp (manuals, "new") == 0 ? 'n'
- : strcmp (manuals, "old") == 0 ? 'o'
- : 'l');
- fprintf (fp, "s%%@(MHMANEXT%d)%%%c%%g\n", i,
- strcmp (manuals, "new") == 0 ? 'n'
- : strcmp (manuals, "old") == 0 ? 'o'
- : 'l');
- }
-
- --- 338,361 ----
- maildir ? maildir : "/usr/spool/mail");
-
- fprintf (fp, "s%%@(MHMANDIR)%%%s%%g\n", mandir);
- + fprintf (fp, "s%%@(MHCATMAN)%%%s%%g\n",
- + strcmp(mancat, "cat") == 0 ? "| nroff -man" : "");
- if (strcmp (manuals, "standard") == 0 || strcmp (manuals, "gen") == 0)
- for (i = 1; i <= 8; i++) {
- ! fprintf (fp, "s%%@(MHMANDIR%d)%%%s%d%%g\n", i, mancat, i);
- fprintf (fp, "s%%@(MHMANEXT%d)%%%d%%g\n", i, i);
- }
- else
- for (i = 1; i <= 8; i++) {
- ! fprintf (fp, "s%%@(MHMANDIR%d)%%%s%c%%g\n", i, mancat,
- strcmp (manuals, "new") == 0 ? 'n'
- : strcmp (manuals, "old") == 0 ? 'o'
- + : strcmp (manuals, "bsd44") == 0 ? i + '0'
- : 'l');
- fprintf (fp, "s%%@(MHMANEXT%d)%%%c%%g\n", i,
- strcmp (manuals, "new") == 0 ? 'n'
- : strcmp (manuals, "old") == 0 ? 'o'
- + : strcmp (manuals, "bsd44") == 0 ? '0'
- : 'l');
- }
-
- ***************
- *** 360,366 ****
- else
- fprintf (fp, "s%%@(MHHOSTVER)%%%s%%g\n", "");
-
- ! if (strcmp (manuals, "gen") == 0 || strcmp (manuals, "gen") == 0)
- fprintf (fp, "s%%@(MHMANGEN)%%%s%%g\n", "#"); /* comment char */
- else
- fprintf (fp, "s%%@(MHMANGEN)%%%s%%g\n", "");
- --- 366,372 ----
- else
- fprintf (fp, "s%%@(MHHOSTVER)%%%s%%g\n", "");
-
- ! if (strcmp (manuals, "gen") == 0 || strcmp (manuals, "none") == 0)
- fprintf (fp, "s%%@(MHMANGEN)%%%s%%g\n", "#"); /* comment char */
- else
- fprintf (fp, "s%%@(MHMANGEN)%%%s%%g\n", "");
- ***************
- *** 708,714 ****
- --- 714,727 ----
- else
- mailfile = mailpath;
-
- + if (cp = index (manuals, '/')) { /* "standard/cat" */
- + *cp++ = 0;
- + mancat = cp;
- + if (strcmp (mancat, "cat"))
- + adios (NULLCP,"invalid manuals setting: %s/%s",manuals, mancat);
- + }
- if (strcmp (manuals, "standard")
- + && strcmp (manuals, "bsd44")
- && strcmp (manuals, "local")
- && strcmp (manuals, "new")
- && strcmp (manuals, "old")
- *** ../mh-6.8/conf/config/mts.c Tue Dec 15 08:52:44 1992
- --- conf/config/mts.c Fri Aug 20 09:14:02 1993
- ***************
- *** 1,6 ****
- /* mts.c - definitions for the mail transport system */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mts.c,v 2.16 1992/11/24 18:40:34 jromine Exp $";
- #endif /* lint */
-
- /* LINTLIBRARY */
- --- 1,6 ----
- /* mts.c - definitions for the mail transport system */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mts.c,v 2.18 1993/08/19 23:36:12 jromine Exp $";
- #endif /* lint */
-
- /* LINTLIBRARY */
- ***************
- *** 502,509 ****
- --- 502,522 ----
- }
-
- np = pw -> pw_gecos;
- + #ifndef GCOS_HACK
- for (cp = fullname; *np && *np != (MMailids ? '<' : ','); *cp++ = *np++)
- continue;
- + #else
- + for (cp = fullname; *np && *np != (MMailids ? '<' : ','); )
- + if (*np == '&') { /* blech! */
- + (void) strcpy(cp, pw -> pw_name);
- + *cp = toupper(*cp);
- + while (*cp)
- + cp++;
- + np++;
- + }
- + else
- + *cp++ = *np++;
- + #endif
- *cp = '\0';
- if (MMailids) {
- if (*np)
- *** ../mh-6.8/conf/doc/folder.rf Tue Dec 15 08:52:49 1992
- --- conf/doc/folder.rf Thu Aug 19 14:20:57 1993
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: folder.rf,v 1.11 1992/10/29 21:50:27 jromine Exp $
- .SC FOLDER 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: folder.rf,v 1.12 1993/08/19 21:20:51 jromine Exp $
- .SC FOLDER 1
- ***************
- *** 198,200 ****
- .Bu
- ! `\-all' forces `\-header'.
- .En
- --- 198,200 ----
- .Bu
- ! `\-all' forces `\-header' and `\-total'.
- .En
- *** ../mh-6.8/conf/doc/mark.rf Tue Dec 15 08:52:50 1992
- --- conf/doc/mark.rf Thu Aug 19 17:04:32 1993
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mark.rf,v 1.7 1992/02/12 00:23:13 jromine Exp $
- .SC MARK 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mark.rf,v 1.9 1993/08/20 00:04:30 jromine Exp $
- .SC MARK 1
- ***************
- *** 83,87 ****
- an alphabetic character followed by zero or more
- ! alphanumeric characters, and can not be one of the \*(lqreserved\*(rq
- ! message names
- ! (e.g., \*(lqfirst\*(rq, \*(lqcur\*(rq, and so forth).
-
- --- 83,87 ----
- an alphabetic character followed by zero or more
- ! alphanumeric characters, and cannot be one of the (reserved)
- ! message names \*(lqnew\*(rq, \*(lqfirst\*(rq,
- ! \*(lqlast\*(rq, \*(lqall\*(rq, \*(lqnext\*(rq, or \*(lqprev\*(rq.
-
- *** ../mh-6.8/conf/doc/mh-chart.rf Tue Dec 15 08:52:51 1992
- --- conf/doc/mh-chart.rf Fri Aug 20 10:13:35 1993
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-chart.rf,v 2.18 1992/11/11 17:34:01 jromine Exp $
- .if '\*(ZZ'-man' \{\
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-chart.rf,v 2.19 1993/08/20 17:13:30 jromine Exp $
- .if '\*(ZZ'-man' \{\
- ***************
- *** 240,242 ****
- .br
- ! \%[\-list\0\%[\-header]\0\%[\-noheader]
- .br
- --- 240,242 ----
- .br
- ! \%[\-list\0\%[\-headers]\0\%[\-noheaders]
- .br
- ***************
- *** 244,248 ****
- .br
- ! \%[\-show\0\%[\-serialonly]\0\%[\-noserialonly]]
- .br
- ! \%[\-form\0formfile]] \%[\-noshow]
- .br
- --- 244,248 ----
- .br
- ! \%[\-show\0\%[\-serialonly]\0\%[\-noserialonly]
- .br
- ! \%[\-form\0formfile]\0\%[\-pause]\0\%[\-nopause]] \%[\-noshow]
- .br
- ***************
- *** 250,255 ****
- .br
- ! \%[\-verbose] \%[\-noverbose]
- ! \%[\-rfc934mode] \%[\-norfc934mode]
- ! \%[\-ebcdic] \%[\-noebcdicsafe]
- ! .br
- \%[\-help]
- --- 250,256 ----
- .br
- ! \%[\-cache\0policy]
- ! \%[\-check]\0\%[\-nocheck]
- ! \%[\-ebcdicsafe]\0\%[\-noebcdicsafe]
- ! \%[\-rfc934mode]\0\%[\-norfc934mode]
- ! \%[\-verbose]\0\%[\-noverbose]
- \%[\-help]
- *** ../mh-6.8/conf/doc/mh-format.rf Tue Dec 15 08:52:51 1992
- --- conf/doc/mh-format.rf Thu Aug 19 13:26:27 1993
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-format.rf,v 1.43 1992/12/02 18:41:50 jromine Exp $
- .SC MH-FORMAT 5
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-format.rf,v 1.45 1993/08/19 20:26:17 jromine Exp $
- .SC MH-FORMAT 5
- ***************
- *** 207,208 ****
- --- 207,209 ----
- getenv literal string Set \fIstr\fR to environment value of \fIarg\fR
- + profile literal string Set \fIstr\fR to profile component \fIarg\fR value
- .\" dat literal int return value of dat[arg]
- *** ../mh-6.8/conf/doc/mh-profile.rf Tue Dec 15 08:52:52 1992
- --- conf/doc/mh-profile.rf Thu Aug 19 16:43:43 1993
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-profile.rf,v 1.19 1992/12/02 22:13:41 jromine Exp $
- .SC MH-PROFILE 5
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-profile.rf,v 1.20 1993/08/19 23:43:36 jromine Exp $
- .SC MH-PROFILE 5
- ***************
- *** 220,223 ****
- This is superceded by the \fBSIGNATURE\fR envariable.
- ! On hosts where \fIMH\fR was configured with the UCI option,
- ! if \fBSIGNATURE\fR is not set and this profile entry is not present,
- the file $HOME/.signature is consulted.
- --- 220,225 ----
- This is superceded by the \fBSIGNATURE\fR envariable.
- ! If \fBSIGNATURE\fR is not set and this profile entry is not present,
- ! the \*(lqgcos\*(rq field of the \fI/etc/passwd\fP file will be used;
- ! otherwise,
- ! on hosts where \fIMH\fR was configured with the UCI option,
- the file $HOME/.signature is consulted.
- *** ../mh-6.8/conf/doc/mhn.rf Tue Dec 15 08:52:54 1992
- --- conf/doc/mhn.rf Fri Aug 20 08:42:21 1993
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mhn.rf,v 1.8 1992/12/10 23:59:10 jromine Exp $
- .SC MHN 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mhn.rf,v 1.9 1993/08/20 15:42:08 jromine Exp $
- .SC MHN 1
- ***************
- *** 13,17 ****
- .br
- ! \%[\-show\0\%[\-serialonly]\0\%[\-noserialonly]]
- .br
- ! \%[\-form\0formfile]] \%[\-noshow]
- .br
- --- 13,17 ----
- .br
- ! \%[\-show\0\%[\-serialonly]\0\%[\-noserialonly]
- .br
- ! \%[\-form\0formfile]\0\%[\-pause]\0\%[\-nopause]] \%[\-noshow]
- .br
- ***************
- *** 19,24 ****
- .br
- ! \%[\-verbose] \%[\-noverbose]
- ! \%[\-rfc934mode] \%[\-norfc934mode]
- ! \%[\-ebcdicsafe] \%[\-noebcdicsafe]
- .br
- \%[\-help]
- --- 19,30 ----
- .br
- ! \%[\-cache\0policy]
- .br
- + \%[\-check]\0\%[\-nocheck]
- + .br
- + \%[\-ebcdicsafe]\0\%[\-noebcdicsafe]
- + .br
- + \%[\-rfc934mode]\0\%[\-norfc934mode]
- + .br
- + \%[\-verbose]\0\%[\-noverbose]
- + .br
- \%[\-help]
- ***************
- *** 64,66 ****
- message rfc822, partial, external-body
- ! application octet-stream, oda, postscript
- image jpeg, gif, x-pbm, x-pgm, x-ppm, x-xwd
- --- 70,72 ----
- message rfc822, partial, external-body
- ! application octet-stream, postscript
- image jpeg, gif, x-pbm, x-pgm, x-ppm, x-xwd
- ***************
- *** 90,91 ****
- --- 96,101 ----
-
- + Each content may optionally have an integrity check associated with it.
- + If present and the `-check' switch is given,
- + then \fImhn\fR will attempt to verify the integrity of the content.
- +
- .Uh "Listing the Contents"
- ***************
- *** 136,137 ****
- --- 146,148 ----
- that content.
- + (The p-escape can be disabled by specifying `\-nopause'.)
- Further,
- ***************
- *** 444,445 ****
- --- 455,463 ----
-
- + The caching behavior of \fImhn\fR is controlled with the `\-cache' switch.
- + One of three arguments may be specified:
- + always, indicating that \fImhn\fR should make use of caching whenever possible;
- + ask, indicating that \fImhn\fR should ask the user;
- + and,
- + never, indicating that \fImhn\fR should never make use of caching.
- +
- .Uh "Composing the Contents"
- ***************
- *** 625,630 ****
- name= filename
- ! directory= directoryname (optional)
- site= hostname
- mode= usually \fIascii\fR or \fIimage\fR (optional)
- server= mailbox
- body= command to send for retrieval
- --- 643,651 ----
- name= filename
- ! permission= read-only or read-write
- site= hostname
- + directory= directoryname (optional)
- mode= usually \fIascii\fR or \fIimage\fR (optional)
- + size= number of octets
- server= mailbox
- + subject= subject to send
- body= command to send for retrieval
- ***************
- *** 752,753 ****
- --- 773,777 ----
-
- + If the `-check' switch is given,
- + \fImhn\fR will associate an integrity check with each content.
- +
- .Uh "Automatic Composition"
- ***************
- *** 1002,1003 ****
- --- 1026,1031 ----
- .Ds
- + `\-cache\0ask'
- + .Ds
- + `\-nocheck'
- + .Ds
- `\-noebcdicsafe'
- ***************
- *** 1007,1008 ****
- --- 1035,1038 ----
- `\-headers'
- + .Ds
- + `\-pause'
- .Ds
- *** ../mh-6.8/conf/doc/refile.rf Tue Dec 15 08:52:58 1992
- --- conf/doc/refile.rf Fri Dec 18 16:21:04 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: refile.rf,v 1.11 1992/02/10 20:27:30 jromine Exp $
- .SC REFILE 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: refile.rf,v 1.12 1992/12/19 00:20:58 jromine Exp $
- .SC REFILE 1
- ***************
- *** 52,54 ****
- then \fIrefile\fR will not ask any questions and will proceed as if
- ! the user's answer was \*(lqyes\*(rq for all questions.
-
- --- 52,54 ----
- then \fIrefile\fR will not ask any questions and will proceed as if
- ! the user answered \*(lqyes\*(rq to all questions.
-
- *** ../mh-6.8/conf/doc/scan.rf Tue Dec 15 08:52:59 1992
- --- conf/doc/scan.rf Thu Aug 19 13:43:29 1993
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: scan.rf,v 1.11 1992/10/29 22:01:56 jromine Exp $
- .SC SCAN 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: scan.rf,v 1.12 1993/08/19 20:43:27 jromine Exp $
- .SC SCAN 1
- ***************
- *** 81,83 ****
- To override the output format used by \fIscan\fR,
- ! the `\-format\ string' or `\-format\ file' switches are used.
- This permits individual fields of the scan listing to be extracted with ease.
- --- 81,83 ----
- To override the output format used by \fIscan\fR,
- ! the `\-format\ string' or `\-form\ file' switches are used.
- This permits individual fields of the scan listing to be extracted with ease.
- *** ../mh-6.8/conf/examples/README Tue Dec 15 08:53:03 1992
- --- conf/examples/README Fri Feb 26 14:17:27 1993
- ***************
- *** 1,2 ****
- ! $Id: README,v 1.8 1992/12/14 18:12:18 jromine Exp $
- These files are contributed MH config files from various sites.
- --- 1,2 ----
- ! $Id: README,v 1.8 1992/12/14 18:12:18 jromine Exp jromine $
- These files are contributed MH config files from various sites.
- ***************
- *** 5,6 ****
- --- 5,7 ----
-
- + # 386bsd - MH 6.8, 386BSD system running SendMail
- # aix.sap-ag.de - MH 6.8 options for AIX (AIX 3.2 on RS/6000 350).
- ***************
- *** 10,11 ****
- --- 11,13 ----
- # bsd43.uiuc.edu - MH 6.8 VAX running 4.3 BSD-reno
- + # bsd44.berkeley.edu - MH 6.8, 4.4BSD system running SendMail
- # convex.uiuc.edu - MH 6.8 Convex C240 running ConvexOS v9.1
- *** ../mh-6.8/conf/makefiles/doc Tue Dec 15 08:53:11 1992
- --- conf/makefiles/doc Thu Jun 3 10:43:42 1993
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: doc,v 2.24 1992/10/28 17:01:04 jromine Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: doc,v 2.25 1993/06/03 17:43:20 jromine Exp $
- ##############################################################################
- ***************
- *** 134,136 ****
-
- ! .me.man:; cat tmac.me $< | sed -f me2man.sed > $@
-
- --- 134,136 ----
-
- ! .me.man:; cat tmac.me $< | sed -f me2man.sed @(MHCATMAN) > $@
-
- *** ../mh-6.8/conf/makefiles/sbr Tue Dec 15 08:53:12 1992
- --- conf/makefiles/sbr Fri Feb 26 11:01:32 1993
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: sbr,v 2.19 1992/11/12 22:47:24 jromine Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: sbr,v 2.21 1993/02/26 19:01:31 jromine Exp $
- ##############################################################################
- ***************
- *** 30,32 ****
- SLIBVER = @(SLIBVER)
- ! SLIBDIR = @(SLIBDIR)
- SLFLAGS= @(SLFLAGS)
- --- 30,32 ----
- SLIBVER = @(SLIBVER)
- ! SLIBDIR = $(DESTDIR)@(SLIBDIR)
- SLFLAGS= @(SLFLAGS)
- ***************
- *** 48,49 ****
- --- 48,52 ----
- printsw.c push.c putenv.c pwd.c refile.c remdir.c r1bindex.c \
- + @BEGIN: NORUSERPASS
- + ruserpass.c \
- + @END: NORUSERPASS
- showfile.c smatch.c sprintb.c ssequal.c strindex.c trimcpy.c \
- ***************
- *** 64,65 ****
- --- 67,71 ----
- printsw.o push.o putenv.o pwd.o refile.o remdir.o r1bindex.o \
- + @BEGIN: NORUSERPASS
- + ruserpass.o \
- + @END: NORUSERPASS
- showfile.o smatch.o sprintb.o ssequal.o strindex.o trimcpy.o \
- *** ../mh-6.8/conf/makefiles/support/general Tue Dec 15 08:53:13 1992
- --- conf/makefiles/support/general Fri Aug 20 08:56:28 1993
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: general,v 1.18 1992/10/28 18:56:06 jromine Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: general,v 1.19 1993/08/20 15:56:25 jromine Exp $
- ##############################################################################
- ***************
- *** 280,282 ****
- $(ETCDIR)/mhn_defaults: true
- ! -if [ ! -f $@ ]; then \
- ./bootmhn.sh $(ETCDIR); \
- --- 280,282 ----
- $(ETCDIR)/mhn_defaults: true
- ! -@if [ ! -f $@ ]; then \
- ./bootmhn.sh $(ETCDIR); \
- *** ../mh-6.8/conf/makefiles/uip Tue Dec 15 08:53:14 1992
- --- conf/makefiles/uip Fri Dec 18 09:57:59 1992
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: uip,v 2.38 1992/11/18 16:54:29 jromine Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: uip,v 2.39 1992/12/18 17:57:45 jromine Exp $
- ##############################################################################
- ***************
- *** 86,87 ****
- --- 86,88 ----
- @END: KPOP
- + @END: POP
- @BEGIN: BPOP
- ***************
- *** 94,96 ****
- @END: NNTP
- - @END: POP
- @BEGIN: HESIOD
- --- 95,96 ----
- *** ../mh-6.8/conf/makefiles/zotnet/mts Tue Dec 15 08:53:15 1992
- --- conf/makefiles/zotnet/mts Fri Aug 20 08:56:17 1993
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: mts,v 1.8 1992/02/06 17:29:00 jromine Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: mts,v 1.9 1993/08/20 15:56:12 jromine Exp $
- ##############################################################################
- ***************
- *** 94,96 ****
- $(ETCDIR)/mtstailor: mtstailor
- ! -if [ ! -f $@ ]; then \
- $(REMOVE) $@ zmtstailor; \
- --- 94,96 ----
- $(ETCDIR)/mtstailor: mtstailor
- ! -@if [ ! -f $@ ]; then \
- $(REMOVE) $@ zmtstailor; \
- *** ../mh-6.8/conf/makefiles/zotnet/tws Tue Dec 15 08:53:15 1992
- --- conf/makefiles/zotnet/tws Fri Feb 26 13:51:04 1993
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: tws,v 1.15 1992/11/18 16:54:16 jromine Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: tws,v 1.16 1993/02/26 21:50:51 jromine Exp $
- ##############################################################################
- ***************
- *** 73,74 ****
- --- 73,76 ----
- $(LEX) dtimep.lex | sed -f lexedit.sed > dtimep.c
- + len=`wc -l dtimep.c | awk ' { print $$1 } '`; \
- + if [ $$len -eq 1 ]; then cp dtimep.c-lexed dtimep.c; fi
-
- *** ../mh-6.8/h/fmtcompile.h Tue Dec 15 08:53:20 1992
- --- h/fmtcompile.h Fri Jun 11 23:46:32 1993
- ***************
- *** 1,4 ****
- ! /* @(#)$Id: fmtcompile.h,v 1.9 1992/02/09 07:12:48 jromine Exp $ */
-
- /* Format Types */
- /* -------------*/
- --- 1,4 ----
- ! /* @(#)$Id: fmtcompile.h,v 1.10 1993/06/12 06:46:16 jromine Exp $ */
-
- /* Format Types */
- /* -------------*/
- ***************
- *** 20,104 ****
- #define FT_LS_COMP 12 /* set "str" to component text */
- #define FT_LS_LIT 13 /* set "str" to literal text */
- #define FT_LS_GETENV 14 /* set "str" to getenv(text) */
- ! #define FT_LS_TRIM 15 /* trim trailing white space from "str" */
- ! #define FT_LV_COMP 16 /* set "value" to comp (as dec. num) */
- ! #define FT_LV_COMPFLAG 17 /* set "value" to comp flag word */
- ! #define FT_LV_LIT 18 /* set "value" to literal num */
- ! #define FT_LV_DAT 19 /* set "value" to dat[n] */
- ! #define FT_LV_STRLEN 20 /* set "value" to length of "str" */
- ! #define FT_LV_PLUS_L 21 /* set "value" += literal */
- ! #define FT_LV_MINUS_L 22 /* set "value" -= literal */
- ! #define FT_LV_DIVIDE_L 23 /* set "value" to value / literal */
- ! #define FT_LV_MODULO_L 24 /* set "value" to value % literal */
- ! #define FT_LV_CHAR_LEFT 25 /* set "value" to char left in output */
-
- ! #define FT_LS_MONTH 26 /* set "str" to tws month */
- ! #define FT_LS_LMONTH 27 /* set "str" to long tws month */
- ! #define FT_LS_ZONE 28 /* set "str" to tws timezone */
- ! #define FT_LS_DAY 29 /* set "str" to tws weekday */
- ! #define FT_LS_WEEKDAY 30 /* set "str" to long tws weekday */
- ! #define FT_LS_822DATE 31 /* set "str" to 822 date str */
- ! #define FT_LS_PRETTY 32 /* set "str" to pretty (?) date str */
- ! #define FT_LV_SEC 33 /* set "value" to tws second */
- ! #define FT_LV_MIN 34 /* set "value" to tws minute */
- ! #define FT_LV_HOUR 35 /* set "value" to tws hour */
- ! #define FT_LV_MDAY 36 /* set "value" to tws day of month */
- ! #define FT_LV_MON 37 /* set "value" to tws month */
- ! #define FT_LV_YEAR 38 /* set "value" to tws year */
- ! #define FT_LV_YDAY 39 /* set "value" to tws day of year */
- ! #define FT_LV_WDAY 40 /* set "value" to tws weekday */
- ! #define FT_LV_ZONE 41 /* set "value" to tws timezone */
- ! #define FT_LV_CLOCK 42 /* set "value" to tws clock */
- ! #define FT_LV_RCLOCK 43 /* set "value" to now - tws clock */
- ! #define FT_LV_DAYF 44 /* set "value" to tws day flag */
- ! #define FT_LV_DST 45 /* set "value" to tws daylight savings flag */
- ! #define FT_LV_ZONEF 46 /* set "value" to tws timezone flag */
-
- ! #define FT_LS_PERS 47 /* set "str" to person part of addr */
- ! #define FT_LS_MBOX 48 /* set "str" to mbox part of addr */
- ! #define FT_LS_HOST 49 /* set "str" to host part of addr */
- ! #define FT_LS_PATH 50 /* set "str" to route part of addr */
- ! #define FT_LS_GNAME 51 /* set "str" to group part of addr */
- ! #define FT_LS_NOTE 52 /* set "str" to comment part of addr */
- ! #define FT_LS_ADDR 53 /* set "str" to mbox@host */
- ! #define FT_LS_822ADDR 54 /* set "str" to 822 format addr */
- ! #define FT_LS_FRIENDLY 55 /* set "str" to "friendly" format addr */
- ! #define FT_LV_HOSTTYPE 56 /* set "value" to addr host type */
- ! #define FT_LV_INGRPF 57 /* set "value" to addr in-group flag */
- ! #define FT_LV_NOHOSTF 58 /* set "value" to addr no-host flag */
-
- /* Date Coercion */
- ! #define FT_LOCALDATE 59 /* Coerce date to local timezone */
- ! #define FT_GMTDATE 60 /* Coerce date to gmt */
-
- /* pre-format processing */
- ! #define FT_PARSEDATE 61 /* parse comp into a date (tws) struct */
- ! #define FT_PARSEADDR 62 /* parse comp into a mailaddr struct */
- ! #define FT_FORMATADDR 63 /* let external routine format addr */
- ! #define FT_MYMBOX 64 /* do "mymbox" test on comp */
-
- /* misc. */ /* ADDTOSEQ only works if you include "options LBL" */
- ! #define FT_ADDTOSEQ 65 /* add current msg to a sequence */
-
- /* conditionals & control flow (must be last) */
- ! #define FT_SAVESTR 66 /* save current str reg */
- ! #define FT_DONE 67 /* stop formatting */
- ! #define FT_PAUSE 68 /* pause */
- ! #define FT_NOP 69 /* nop */
- ! #define FT_GOTO 70 /* (relative) goto */
- ! #define FT_IF_S_NULL 71 /* test if "str" null */
- ! #define FT_IF_S 72 /* test if "str" non-null */
- ! #define FT_IF_V_EQ 73 /* test if "value" = literal */
- ! #define FT_IF_V_NE 74 /* test if "value" != literal */
- ! #define FT_IF_V_GT 75 /* test if "value" > literal */
- ! #define FT_IF_MATCH 76 /* test if "str" contains literal */
- ! #define FT_IF_AMATCH 77 /* test if "str" starts with literal */
- ! #define FT_S_NULL 78 /* V = 1 if "str" null */
- ! #define FT_S_NONNULL 79 /* V = 1 if "str" non-null */
- ! #define FT_V_EQ 80 /* V = 1 if "value" = literal */
- ! #define FT_V_NE 81 /* V = 1 if "value" != literal */
- ! #define FT_V_GT 82 /* V = 1 if "value" > literal */
- ! #define FT_V_MATCH 83 /* V = 1 if "str" contains literal */
- ! #define FT_V_AMATCH 84 /* V = 1 if "str" starts with literal */
-
- ! #define IF_FUNCS FT_S_NULL /* start of "if" functions */
- --- 20,105 ----
- #define FT_LS_COMP 12 /* set "str" to component text */
- #define FT_LS_LIT 13 /* set "str" to literal text */
- #define FT_LS_GETENV 14 /* set "str" to getenv(text) */
- ! #define FT_LS_MFIND 15 /* set "str" to m_find(text) */
- ! #define FT_LS_TRIM 16 /* trim trailing white space from "str" */
- ! #define FT_LV_COMP 17 /* set "value" to comp (as dec. num) */
- ! #define FT_LV_COMPFLAG 18 /* set "value" to comp flag word */
- ! #define FT_LV_LIT 19 /* set "value" to literal num */
- ! #define FT_LV_DAT 20 /* set "value" to dat[n] */
- ! #define FT_LV_STRLEN 21 /* set "value" to length of "str" */
- ! #define FT_LV_PLUS_L 22 /* set "value" += literal */
- ! #define FT_LV_MINUS_L 23 /* set "value" -= literal */
- ! #define FT_LV_DIVIDE_L 24 /* set "value" to value / literal */
- ! #define FT_LV_MODULO_L 25 /* set "value" to value % literal */
- ! #define FT_LV_CHAR_LEFT 26 /* set "value" to char left in output */
-
- ! #define FT_LS_MONTH 27 /* set "str" to tws month */
- ! #define FT_LS_LMONTH 28 /* set "str" to long tws month */
- ! #define FT_LS_ZONE 29 /* set "str" to tws timezone */
- ! #define FT_LS_DAY 30 /* set "str" to tws weekday */
- ! #define FT_LS_WEEKDAY 31 /* set "str" to long tws weekday */
- ! #define FT_LS_822DATE 32 /* set "str" to 822 date str */
- ! #define FT_LS_PRETTY 33 /* set "str" to pretty (?) date str */
- ! #define FT_LV_SEC 34 /* set "value" to tws second */
- ! #define FT_LV_MIN 35 /* set "value" to tws minute */
- ! #define FT_LV_HOUR 36 /* set "value" to tws hour */
- ! #define FT_LV_MDAY 37 /* set "value" to tws day of month */
- ! #define FT_LV_MON 38 /* set "value" to tws month */
- ! #define FT_LV_YEAR 39 /* set "value" to tws year */
- ! #define FT_LV_YDAY 40 /* set "value" to tws day of year */
- ! #define FT_LV_WDAY 41 /* set "value" to tws weekday */
- ! #define FT_LV_ZONE 42 /* set "value" to tws timezone */
- ! #define FT_LV_CLOCK 43 /* set "value" to tws clock */
- ! #define FT_LV_RCLOCK 44 /* set "value" to now - tws clock */
- ! #define FT_LV_DAYF 45 /* set "value" to tws day flag */
- ! #define FT_LV_DST 46 /* set "value" to tws daylight savings flag */
- ! #define FT_LV_ZONEF 47 /* set "value" to tws timezone flag */
-
- ! #define FT_LS_PERS 48 /* set "str" to person part of addr */
- ! #define FT_LS_MBOX 49 /* set "str" to mbox part of addr */
- ! #define FT_LS_HOST 50 /* set "str" to host part of addr */
- ! #define FT_LS_PATH 51 /* set "str" to route part of addr */
- ! #define FT_LS_GNAME 52 /* set "str" to group part of addr */
- ! #define FT_LS_NOTE 53 /* set "str" to comment part of addr */
- ! #define FT_LS_ADDR 54 /* set "str" to mbox@host */
- ! #define FT_LS_822ADDR 55 /* set "str" to 822 format addr */
- ! #define FT_LS_FRIENDLY 56 /* set "str" to "friendly" format addr */
- ! #define FT_LV_HOSTTYPE 57 /* set "value" to addr host type */
- ! #define FT_LV_INGRPF 58 /* set "value" to addr in-group flag */
- ! #define FT_LV_NOHOSTF 59 /* set "value" to addr no-host flag */
-
- /* Date Coercion */
- ! #define FT_LOCALDATE 60 /* Coerce date to local timezone */
- ! #define FT_GMTDATE 61 /* Coerce date to gmt */
-
- /* pre-format processing */
- ! #define FT_PARSEDATE 62 /* parse comp into a date (tws) struct */
- ! #define FT_PARSEADDR 63 /* parse comp into a mailaddr struct */
- ! #define FT_FORMATADDR 64 /* let external routine format addr */
- ! #define FT_MYMBOX 65 /* do "mymbox" test on comp */
-
- /* misc. */ /* ADDTOSEQ only works if you include "options LBL" */
- ! #define FT_ADDTOSEQ 66 /* add current msg to a sequence */
-
- /* conditionals & control flow (must be last) */
- ! #define FT_SAVESTR 67 /* save current str reg */
- ! #define FT_DONE 68 /* stop formatting */
- ! #define FT_PAUSE 69 /* pause */
- ! #define FT_NOP 70 /* nop */
- ! #define FT_GOTO 71 /* (relative) goto */
- ! #define FT_IF_S_NULL 72 /* test if "str" null */
- ! #define FT_IF_S 73 /* test if "str" non-null */
- ! #define FT_IF_V_EQ 74 /* test if "value" = literal */
- ! #define FT_IF_V_NE 75 /* test if "value" != literal */
- ! #define FT_IF_V_GT 76 /* test if "value" > literal */
- ! #define FT_IF_MATCH 77 /* test if "str" contains literal */
- ! #define FT_IF_AMATCH 78 /* test if "str" starts with literal */
- ! #define FT_S_NULL 79 /* V = 1 if "str" null */
- ! #define FT_S_NONNULL 80 /* V = 1 if "str" non-null */
- ! #define FT_V_EQ 81 /* V = 1 if "value" = literal */
- ! #define FT_V_NE 82 /* V = 1 if "value" != literal */
- ! #define FT_V_GT 83 /* V = 1 if "value" > literal */
- ! #define FT_V_MATCH 84 /* V = 1 if "str" contains literal */
- ! #define FT_V_AMATCH 85 /* V = 1 if "str" starts with literal */
-
- ! #define IF_FUNCS FT_S_NULL /* start of "if" functions */
- *** ../mh-6.8/h/mh.h Tue Dec 15 08:53:21 1992
- --- h/mh.h Fri Feb 26 13:53:33 1993
- ***************
- *** 1,5 ****
- /* mh.h - main header file for all of MH */
- ! /* @(#)$Id: mh.h,v 2.18 1992/12/14 17:10:43 jromine Exp $ */
-
-
- /* Well-used constants */
- --- 1,5 ----
- /* mh.h - main header file for all of MH */
- ! /* @(#)$Id: mh.h,v 2.19 1993/02/26 21:53:29 jromine Exp $ */
-
-
- /* Well-used constants */
- ***************
- *** 332,338 ****
-
- /* should be in <stdio.h> */
-
- ! #if !defined(SYS5) && !defined(ncr) && !defined(_AIX) && !defined(OSF1) && !defined(__convex__)
- typedef struct _iobuf *FP;
- FP popen ();
- #else /* SYS5 */
- --- 332,338 ----
-
- /* should be in <stdio.h> */
-
- ! #if !defined(SYS5) && !defined(ncr) && !defined(_AIX) && !defined(OSF1) && !defined(__convex__) && !defined(__386BSD__) && !defined(BSD44)
- typedef struct _iobuf *FP;
- FP popen ();
- #else /* SYS5 */
- *** ../mh-6.8/h/mhn.h Tue Dec 15 08:53:22 1992
- --- h/mhn.h Fri Aug 20 08:43:47 1993
- ***************
- *** 1,5 ****
- /* mhn.h - definitions for mhn & friends */
- ! /* @(#)$Id: mhn.h,v 1.2 1992/10/16 17:13:19 jromine Exp $ */
-
- #define VRSN_FIELD "MIME-Version"
- #define VRSN_VALUE "1.0"
- --- 1,5 ----
- /* mhn.h - definitions for mhn & friends */
- ! /* @(#)$Id: mhn.h,v 1.3 1993/08/20 15:43:43 jromine Exp $ */
-
- #define VRSN_FIELD "MIME-Version"
- #define VRSN_VALUE "1.0"
- ***************
- *** 13,18 ****
- --- 13,20 ----
- #define ID_FIELD "Content-ID"
-
- #define DESCR_FIELD "Content-Description"
- +
- + #define MD5_FIELD "Content-MD5"
-
-
- #define isatom(c) \
- *** ../mh-6.8/h/strings.h Tue Dec 15 08:53:23 1992
- --- h/strings.h Fri Feb 26 13:54:05 1993
- ***************
- *** 1,5 ****
- /* strings.h - define standard string functions */
- ! /* @(#)$Id: strings.h,v 1.18 1992/11/12 19:34:05 jromine Exp $ */
-
- #ifndef _STRINGS /* once-only... */
- #define _STRINGS
- --- 1,5 ----
- /* strings.h - define standard string functions */
- ! /* @(#)$Id: strings.h,v 1.19 1993/02/26 21:54:00 jromine Exp $ */
-
- #ifndef _STRINGS /* once-only... */
- #define _STRINGS
- ***************
- *** 25,31 ****
- #endif /* SYS5 */
-
- #if defined(BSD42) || defined(SVR4)
- ! #ifndef SVR4
- #include <strings.h>
- #else
- #include <string.h>
- --- 25,31 ----
- #endif /* SYS5 */
-
- #if defined(BSD42) || defined(SVR4)
- ! #if !defined(SVR4) && !defined(__386BSD__) && !defined(BSD44)
- #include <strings.h>
- #else
- #include <string.h>
- ***************
- *** 51,57 ****
- char *strncpy ();
- #endif
-
- ! #ifndef SVR4
- char *getenv ();
- char *calloc (), *malloc (), *realloc ();
- #endif /* SVR4 */
- --- 51,57 ----
- char *strncpy ();
- #endif
-
- ! #if !defined(SVR4) && !defined(__386BSD__) && !defined(BSD44)
- char *getenv ();
- char *calloc (), *malloc (), *realloc ();
- #endif /* SVR4 */
- *** ../mh-6.8/mts/sendmail/smail.c Tue Dec 15 08:54:27 1992
- --- mts/sendmail/smail.c Fri Aug 20 09:14:35 1993
- ***************
- *** 1,6 ****
- /* smail.c - MH interface to SendMail/SMTP */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: smail.c,v 1.21 1992/11/09 18:19:32 jromine Exp $";
- #endif
-
- /* LINTLIBRARY */
- --- 1,6 ----
- /* smail.c - MH interface to SendMail/SMTP */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: smail.c,v 1.24 1993/08/20 16:14:30 jromine Exp $";
- #endif
-
- /* LINTLIBRARY */
- ***************
- *** 118,123 ****
- --- 118,131 ----
- extern char **brkstring (), **copyip (), *getcpy ();
- #endif
-
- +
- + static int doingEHLO;
- +
- + #define MAXEHLO 10
- + char *EHLOkeys[MAXEHLO + 1];
- +
- + char *EHLOset ();
- +
- /* */
-
- #ifndef SMTP
- ***************
- *** 124,135 ****
-
- /* ARGSUSED */
-
- ! int sm_init (client, server, watch, verbose, debug)
- ! register char *client;
- ! char *server;
- ! register int watch,
- ! verbose,
- ! debug;
- {
- register int i,
- result,
- --- 132,145 ----
-
- /* ARGSUSED */
-
- ! int sm_init (client, server, watch, verbose, debug, onex, queued)
- ! char *client,
- ! *server;
- ! int watch,
- ! verbose,
- ! debug,
- ! onex,
- ! queued;
- {
- register int i,
- result,
- ***************
- *** 148,153 ****
- --- 158,164 ----
- sm_debug = debug;
- if (sm_rfp != NULL && sm_wfp != NULL)
- return RP_OK;
- +
- #ifdef ZMAILER
- if (client == NULL || *client == '\0')
- client = "localhost";
- ***************
- *** 185,191 ****
- vec[vecp++] = r1bindex (sendmail, '/');
- vec[vecp++] = "-bs";
- #ifndef ZMAILER
- ! vec[vecp++] = watch ? "-odi" : "-odb";
- vec[vecp++] = "-oem";
- vec[vecp++] = "-om";
- #ifndef RAND
- --- 196,202 ----
- vec[vecp++] = r1bindex (sendmail, '/');
- vec[vecp++] = "-bs";
- #ifndef ZMAILER
- ! vec[vecp++] = watch ? "-odi" : queued ? "-odq" : "-odb";
- vec[vecp++] = "-oem";
- vec[vecp++] = "-om";
- #ifndef RAND
- ***************
- *** 227,246 ****
- (void) sm_end (NOTOK);
- return RP_RPLY;
- }
- - #ifndef ZMAILER
- - (void) smtalk(SM_HELO, "ONEX");
- - #endif /* not ZMAILER */
- - if (watch)
- - (void) smtalk(SM_HELO, "VERB on");
- - if (client && *client)
- - switch (smtalk (SM_HELO, "HELO %s", client)) {
- - case 250:
- - break;
-
- ! default:
- (void) sm_end (NOTOK);
- return RP_RPLY;
- }
- return RP_OK;
- }
- }
- --- 238,269 ----
- (void) sm_end (NOTOK);
- return RP_RPLY;
- }
-
- ! if (client && *client) {
- ! doingEHLO = 1;
- ! result = smtalk (SM_HELO, "EHLO %s", client);
- ! doingEHLO = 0;
- !
- ! if (500 <= result && result <= 599)
- ! result = smtalk (SM_HELO, "HELO %s", client);
- !
- ! switch (result) {
- ! case 250:
- ! break;
- !
- ! default:
- (void) sm_end (NOTOK);
- return RP_RPLY;
- }
- + }
- +
- + #ifndef ZMAILER
- + if (onex)
- + (void) smtalk (SM_HELO, "ONEX");
- + #endif
- + if (watch)
- + (void) smtalk (SM_HELO, "VERB on");
- +
- return RP_OK;
- }
- }
- ***************
- *** 248,259 ****
-
- /* */
-
- ! int sm_init (client, server, watch, verbose, debug)
- ! register char *client,
- ! *server;
- ! register int watch,
- ! verbose,
- ! debug;
- {
- register int result,
- sd1,
- --- 271,284 ----
-
- /* */
-
- ! int sm_init (client, server, watch, verbose, debug, onex, queued)
- ! char *client,
- ! *server;
- ! int watch,
- ! verbose,
- ! debug,
- ! onex,
- ! queued;
- {
- register int result,
- sd1,
- ***************
- *** 260,274 ****
- sd2;
-
- if (watch)
- ! #if defined(SUN40) && !defined(MMDFII)
- ! debug = verbose = TRUE;
- ! #else
- verbose = TRUE;
- #endif
- sm_verbose = verbose;
- sm_debug = debug;
- if (sm_rfp != NULL && sm_wfp != NULL)
- ! return RP_OK;
- #ifdef ZMAILER
- if (client == NULL || *client == '\0')
- client = "localhost";
- --- 285,304 ----
- sd2;
-
- if (watch)
- ! #if !defined(SUN40) || defined(MMDFII)
- verbose = TRUE;
- + #else /* to show the transaction, -watch must imply -snoop */
- + debug = verbose = TRUE;
- #endif
- sm_verbose = verbose;
- sm_debug = debug;
- + #ifdef MPOP
- + if (sm_ispool)
- + goto all_done;
- + #endif
- if (sm_rfp != NULL && sm_wfp != NULL)
- ! goto send_options;
- !
- #ifdef ZMAILER
- if (client == NULL || *client == '\0')
- client = "localhost";
- ***************
- *** 277,288 ****
- if (client == NULL || *client == 0)
- client = LocalName ();
- #endif
- ! #endif /* ZMAILER */
-
- - #ifdef MPOP
- - if (sm_ispool)
- - goto all_done;
- - #endif
- if ((sd1 = rclient (server, "tcp", "smtp")) == NOTOK)
- return RP_BHST;
- #ifdef MPOP
- --- 307,314 ----
- if (client == NULL || *client == 0)
- client = LocalName ();
- #endif
- ! #endif /* not ZMAILER */
-
- if ((sd1 = rclient (server, "tcp", "smtp")) == NOTOK)
- return RP_BHST;
- #ifdef MPOP
- ***************
- *** 330,344 ****
- (void) sm_end (NOTOK);
- return RP_RPLY;
- }
- ! #if !(defined(ZMAILER) || defined(MMDFII))
- ! (void) smtalk(SM_HELO, "ONEX");
- ! #endif /* not ZMAILER */
- ! #ifndef MMDFII
- ! if (watch)
- ! (void) smtalk(SM_HELO, "VERB on");
- ! #endif
- ! if (client && *client)
- ! switch (smtalk (SM_HELO, "HELO %s", client)) {
- case 250:
- break;
-
- --- 356,371 ----
- (void) sm_end (NOTOK);
- return RP_RPLY;
- }
- !
- ! if (client && *client) {
- ! doingEHLO = 1;
- ! result = smtalk (SM_HELO, "EHLO %s", client);
- ! doingEHLO = 0;
- !
- ! if (500 <= result && result <= 599)
- ! result = smtalk (SM_HELO, "HELO %s", client);
- !
- ! switch (result) {
- case 250:
- break;
-
- ***************
- *** 346,352 ****
- --- 373,388 ----
- (void) sm_end (NOTOK);
- return RP_RPLY;
- }
- + }
-
- + send_options: ;
- + if (watch && EHLOset ("XVRB"))
- + (void) smtalk (SM_HELO, "VERB on");
- + if (onex && EHLOset ("XONE"))
- + (void) smtalk (SM_HELO, "ONEX");
- + if (queued && EHLOset ("XQUE"))
- + (void) smtalk (SM_HELO, "QUED");
- +
- return RP_OK;
- }
-
- ***************
- *** 1201,1208 ****
- int bc;
- register char *bp,
- *rp;
- ! char buffer[BUFSIZ];
-
- again: ;
-
- sm_reply.text[sm_reply.length = 0] = 0;
- --- 1237,1260 ----
- int bc;
- register char *bp,
- *rp;
- ! char **ehlo,
- ! buffer[BUFSIZ];
-
- + if (doingEHLO) {
- + static int at_least_once = 0;
- +
- + if (at_least_once) {
- + char *ep;
- +
- + for (ehlo = EHLOkeys; ep = *ehlo; ehlo++)
- + free (ep);
- + }
- + else
- + at_least_once = 1;
- +
- + *(ehlo = EHLOkeys) = NULL;
- + }
- +
- again: ;
-
- sm_reply.text[sm_reply.length = 0] = 0;
- ***************
- *** 1214,1219 ****
- --- 1266,1291 ----
- (void) fflush (stdout);
- }
-
- + if (doingEHLO
- + && strncmp (buffer, "250", sizeof "250" - 1) == 0
- + && (buffer[3] == '-' || doingEHLO == 2)
- + && buffer[4]) {
- + if (doingEHLO == 2) {
- + int len = strlen (buffer + 4);
- +
- + if (*ehlo = malloc ((unsigned) (strlen (buffer + 4) + 1))) {
- + (void) strcpy (*ehlo++, buffer + 4);
- + *ehlo = NULL;
- + if (ehlo >= EHLOkeys + MAXEHLO)
- + doingEHLO = 0;
- + }
- + else
- + doingEHLO = 0;
- + }
- + else
- + doingEHLO = 2;
- + }
- +
- for (; bc > 0 && (!isascii (*bp) || !isdigit (*bp)); bp++, bc--)
- continue;
-
- ***************
- *** 1261,1266 ****
- --- 1333,1339 ----
- }
-
- sm_reply.length = rp - sm_reply.text;
- +
- return sm_reply.code;
- }
-
- ***************
- *** 1445,1447 ****
- --- 1518,1539 ----
- }
- #endif
- #endif /* MPOP */
- +
- + /* */
- +
- + char *EHLOset (s)
- + char *s;
- + {
- + int len = strlen (s);
- + register char *ep,
- + **ehlo;
- +
- + for (ehlo = EHLOkeys; ep = *ehlo; ehlo++)
- + if (strncmp (ep, s, len) == 0) {
- + for (ep += len; *ep == ' '; ep++)
- + continue;
- + return ep;
- + }
- +
- + return 0;
- + }
- *** ../mh-6.8/sbr/discard.c Tue Dec 15 08:55:13 1992
- --- sbr/discard.c Fri Feb 26 13:56:13 1993
- ***************
- *** 1,10 ****
- /* discard.c - discard output on a file pointer */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: discard.c,v 1.6 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- #ifndef SYS5
- #include <sgtty.h>
- #else /* SYS5 */
- --- 1,13 ----
- /* discard.c - discard output on a file pointer */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: discard.c,v 1.7 1993/02/26 21:56:04 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- + #ifdef POSIX
- + #include <termios.h>
- + #else
- #ifndef SYS5
- #include <sgtty.h>
- #else /* SYS5 */
- ***************
- *** 14,33 ****
- --- 17,42 ----
- #include <sys/ioctl.h>
- #endif /* NOIOCTLH */
- #endif /* SYS5 */
- + #endif /* POSIX */
-
-
- void discard (io)
- FILE *io;
- {
- + #ifndef POSIX
- #ifndef SYS5
- struct sgttyb sg;
- #else /* SYS5 */
- struct termio sg;
- #endif /* SYS5 */
- + #endif /* POSIX */
-
- if (io == NULL)
- return;
-
- + #ifdef POSIX
- + tcflush (fileno (io), TCOFLUSH);
- + #else
- #ifndef SYS5
- if (ioctl (fileno (io), TIOCGETP, (char *) &sg) != NOTOK)
- (void) ioctl (fileno (io), TIOCSETP, (char *) &sg);
- ***************
- *** 35,41 ****
- --- 44,55 ----
- if (ioctl (fileno (io), TCGETA, &sg) != NOTOK)
- (void) ioctl (fileno (io), TCSETA, &sg);
- #endif /* SYS5 */
- + #endif /* POSIX */
-
- + #ifdef _FSTDIO
- + fpurge (io);
- + #else
- if (io -> _ptr = io -> _base)
- io -> _cnt = 0;
- + #endif
- }
- *** ../mh-6.8/sbr/fmtcompile.c Tue Dec 15 08:55:13 1992
- --- sbr/fmtcompile.c Thu Aug 19 14:05:48 1993
- ***************
- *** 1,6 ****
- /* fmtcompile.c - "compile" format strings for fmtscan */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: fmtcompile.c,v 1.15 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* fmtcompile.c - "compile" format strings for fmtscan */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: fmtcompile.c,v 1.17 1993/08/19 21:05:42 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- ***************
- *** 64,69 ****
- --- 64,70 ----
- "comp", TF_COMP, FT_LS_COMP, 0, TFL_PUTS,
- "lit", TF_STR, FT_LS_LIT, 0, TFL_PUTS,
- "getenv", TF_STR, FT_LS_GETENV, 0, TFL_PUTS,
- + "profile", TF_STR, FT_LS_MFIND, 0, TFL_PUTS,
- "trim", TF_EXPR, FT_LS_TRIM, 0, 0,
- "compval", TF_COMP, FT_LV_COMP, 0, TFL_PUTN,
- "compflag", TF_COMP, FT_LV_COMPFLAG, 0, TFL_PUTN,
- ***************
- *** 371,377 ****
- register int i;
- static int primed = 0;
-
- ! while (isalnum(c = *cp++) || c == '-')
- ;
- if (c != '}') {
- CERROR("'}' expected");
- --- 372,378 ----
- register int i;
- static int primed = 0;
-
- ! while (isalnum(c = *cp++) || c == '-' || c == '_')
- ;
- if (c != '}') {
- CERROR("'}' expected");
- *** ../mh-6.8/sbr/formatsbr.c Tue Dec 15 08:55:14 1992
- --- sbr/formatsbr.c Fri Aug 20 08:48:29 1993
- ***************
- *** 1,6 ****
- /* formatsbr.c - format string interpretation */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: formatsbr.c,v 1.21 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* formatsbr.c - format string interpretation */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: formatsbr.c,v 1.24 1993/08/20 15:48:14 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- ***************
- *** 59,65 ****
- if ((formats = malloc ((unsigned) st.st_size + 1)) == NULLCP)
- adios (form, "unable to allocate space for format");
-
- ! if (read (fileno(fp), formats, st.st_size) != st.st_size)
- adios (form, "error reading format file");
-
- formats[st.st_size] = '\0';
- --- 59,65 ----
- if ((formats = malloc ((unsigned) st.st_size + 1)) == NULLCP)
- adios (form, "unable to allocate space for format");
-
- ! if (read (fileno(fp), formats, (int) st.st_size) != st.st_size)
- adios (form, "error reading format file");
-
- formats[st.st_size] = '\0';
- ***************
- *** 304,310 ****
-
- if (get_x400_comp (mbox, "/PN=", buffer)) {
- for (mbox = buffer; mbox = index (mbox, '.'); )
- ! *mbox++ = 0;
-
- return buffer;
- }
- --- 304,310 ----
-
- if (get_x400_comp (mbox, "/PN=", buffer)) {
- for (mbox = buffer; mbox = index (mbox, '.'); )
- ! *mbox++ = ' ';
-
- return buffer;
- }
- ***************
- *** 506,511 ****
- --- 506,515 ----
- break;
- case FT_LS_GETENV:
- if (!(str = getenv (fmt->f_text)))
- + str = "";
- + break;
- + case FT_LS_MFIND:
- + if (!(str = m_find (fmt->f_text)))
- str = "";
- break;
- case FT_LS_TRIM:
- *** ../mh-6.8/sbr/m_getfld.c Tue Dec 15 08:55:18 1992
- --- sbr/m_getfld.c Fri Feb 26 13:57:19 1993
- ***************
- *** 1,6 ****
- /* m_getfld.c - read/parse a message */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: m_getfld.c,v 1.14 1992/10/31 07:44:56 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* m_getfld.c - read/parse a message */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: m_getfld.c,v 1.15 1993/02/26 21:57:14 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- ***************
- *** 170,175 ****
- --- 170,181 ----
- static int edelimlen;
-
- static int (*eom_action) () = NULL;
- +
- + #ifdef _FSTDIO
- + #define _ptr _p /* Gag */
- + #define _cnt _r /* Retch */
- + #define _filbuf __srget /* Puke */
- + #endif
-
- /* */
-
- *** ../mh-6.8/sbr/pidstatus.c Tue Dec 15 08:55:23 1992
- --- sbr/pidstatus.c Fri Feb 26 13:57:37 1993
- ***************
- *** 1,6 ****
- /* pidstatus.c - report child's status */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: pidstatus.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* pidstatus.c - report child's status */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: pidstatus.c,v 1.4 1993/02/26 21:57:34 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- ***************
- *** 8,13 ****
- --- 8,14 ----
- #include <stdio.h>
-
-
- + #ifndef BSD44
- #ifndef BSD42
- static char *sigs[] = {
- NULL,
- ***************
- *** 45,50 ****
- --- 46,52 ----
- #else
- extern char *sys_siglist[];
- #endif /* BSD42 */
- + #endif /* BSD44 defines sys_siglist in signal.h */
-
- /* */
-
- *** ../mh-6.8/support/general/bootmhn.sh Tue Dec 15 08:55:37 1992
- --- support/general/bootmhn.sh Fri Aug 20 08:49:03 1993
- ***************
- *** 18,19 ****
- --- 18,21 ----
- echo "mhn-store-text: %m%P.txt" >> $TMP
- + echo "mhn-store-text/richtext: %m%P.rt" >> $TMP
- + echo "mhn-store-video/mpeg: %m%P.mpg" >> $TMP
- echo "mhn-store-application/PostScript: %m%P.ps" >> $TMP
- ***************
- *** 68,72 ****
- mhn-store-audio/x-next: %m%P.au" >> $TMP
- echo "\
- ! mhn-compose-audio/basic: ${AUDIODIR}record | ${AUDIODIR}raw2audio -F
- ! mhn-show-audio/basic: %p${AUDIODIR}raw2audio 2>/dev/null | play" >> $TMP
-
- --- 70,81 ----
- mhn-store-audio/x-next: %m%P.au" >> $TMP
- + AUDIOTOOL="`./bootmhn.findit audiotool $LIB`"
- + if [ ! -z "$AUDIOTOOL" ]; then
- + echo "\
- + mhn-compose-audio/basic: $AUDIOTOOL %f && ${AUDIODIR}raw2audio -F < %f" >> $TMP
- + else
- + echo "\
- + mhn-compose-audio/basic: trap \"exit 0\" 2 && ${AUDIODIR}record | ${AUDIODIR}raw2audio -F" >> $TMP
- + fi
- echo "\
- ! mhn-show-audio/basic: %p${AUDIODIR}raw2audio 2>/dev/null | ${AUDIODIR}play" >> $TMP
-
- ***************
- *** 75,78 ****
- DIR="`echo $PGM | awk -F/ '{ for(i=2;i<NF;i++)printf "/%s", $i;}'`"/
- echo "\
- - mhn-compose-audio/x-next: ${AUDIODIR}record | ${DIR}adpcm_enc
- mhn-show-audio/x-next: %p${DIR}adpcm_dec | ${AUDIODIR}play" >> $TMP
- --- 84,93 ----
- DIR="`echo $PGM | awk -F/ '{ for(i=2;i<NF;i++)printf "/%s", $i;}'`"/
- + if [ ! -z "$AUDIOTOOL" ]; then
- + echo "\
- + mhn-compose-audio/x-next: $AUDIOTOOL %f && ${DIR}adpcm_enc < %f" >> $TMP
- + else
- + echo "\
- + mhn-compose-audio/x-next: ${AUDIODIR}record | ${DIR}adpcm_enc" >> $TMP
- + fi
- echo "\
- mhn-show-audio/x-next: %p${DIR}adpcm_dec | ${AUDIODIR}play" >> $TMP
- ***************
- *** 79,82 ****
- else
- echo "\
- - mhn-compose-audio/x-next: ${AUDIODIR}record
- mhn-show-audio/x-next: %p${AUDIODIR}play" >> $TMP
- --- 94,103 ----
- else
- + if [ ! -z "$AUDIOTOOL" ]; then
- + echo "\
- + mhn-compose-audio/x-next: $AUDIOTOOL %f" >> $TMP
- + else
- + echo "\
- + mhn-compose-audio/x-next: ${AUDIODIR}record" >> $TMP
- + fi
- echo "\
- mhn-show-audio/x-next: %p${AUDIODIR}play" >> $TMP
- ***************
- *** 88,89 ****
- --- 109,116 ----
- fi
- + fi
- +
- + PGM="`./bootmhn.findit mpeg_play $LIB`"
- + if [ ! -z "$PGM" ]; then
- + echo "\
- + mhn-show-video/mpeg: %p$PGM '%f'" >> $TMP
- fi
- *** ../mh-6.8/support/general/viamail.sh Tue Dec 15 08:55:40 1992
- --- support/general/viamail.sh Fri Aug 20 08:49:21 1993
- ***************
- *** 1,3 ****
- : run this script through /bin/sh
- ! : '@(#)$Id: viamail.sh,v 1.2 1992/10/16 17:15:00 jromine Exp $'
-
- --- 1,3 ----
- : run this script through /bin/sh
- ! : '@(#)$Id: viamail.sh,v 1.4 1993/08/20 15:49:19 jromine Exp $'
-
- ***************
- *** 28,32 ****
-
- ! tar cvf - $* | compress | \
- mhn -viamail "$mailpath" -viasubj "$subject" \
- ! -viaparm "type=tar; conversions=x-compress" \
- -viacmnt "extract with uncompress | tar xvpf -" \
- --- 28,32 ----
-
- ! tar cvf - "$@" | compress | \
- mhn -viamail "$mailpath" -viasubj "$subject" \
- ! -viaparm "type=tar; x-conversions=x-compress" \
- -viacmnt "extract with uncompress | tar xvpf -" \
- *** ../mh-6.8/support/pop/popd.c Tue Dec 15 08:55:50 1992
- --- support/pop/popd.c Fri Feb 26 14:11:25 1993
- ***************
- *** 1,6 ****
- /* popd.c - the POP server */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: popd.c,v 1.13 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
-
- /* Author: Marshall T. Rose <MRose@UDel> (MTR)
- --- 1,6 ----
- /* popd.c - the POP server */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: popd.c,v 1.15 1993/02/26 22:11:12 jromine Exp $";
- #endif /* lint */
-
- /* Author: Marshall T. Rose <MRose@UDel> (MTR)
- ***************
- *** 60,66 ****
- --- 60,68 ----
- extern int errno;
- extern int sys_nerr;
- extern char *sys_errlist[];
- + #ifndef BSD44 /* const */
- extern char *sys_siglist[];
- + #endif
-
-
- int debug = 0;
- ***************
- *** 83,89 ****
- static AUTH_DAT kdata;
- #endif
-
- ! static int chldser ();
- void padios (), padvise ();
-
- static server(), arginit(), envinit();
- --- 85,91 ----
- static AUTH_DAT kdata;
- #endif
-
- ! static TYPESIG chldser ();
- void padios (), padvise ();
-
- static server(), arginit(), envinit();
- ***************
- *** 258,264 ****
- #endif /* BSD43 */
- port = ntohs (sin -> sin_port);
- addr = &sin -> sin_addr;
- ! hp = gethostbyaddr (addr, sizeof *addr, sin -> sin_family);
- padvise (NULLCP, LOG_INFO, "servicing %s/%d",
- hp ? hp -> h_name : inet_ntoa (*addr), port);
- if (fd != 0)
- --- 260,266 ----
- #endif /* BSD43 */
- port = ntohs (sin -> sin_port);
- addr = &sin -> sin_addr;
- ! hp = gethostbyaddr ((char *)addr, sizeof *addr, sin -> sin_family);
- padvise (NULLCP, LOG_INFO, "servicing %s/%d",
- hp ? hp -> h_name : inet_ntoa (*addr), port);
- if (fd != 0)
- ***************
- *** 404,418 ****
-
- #ifdef SIGCHLD
-
- ! static int chldser (sig, code, sc)
- int sig;
- long code;
- struct sigcontext *sc;
- {
- #if defined(BSD42) && !defined(WAITINT)
- - int status;
- - #else
- union wait status;
- #endif
-
- while (wait3 (&status, WNOHANG, NULLRP) > 0)
- --- 406,420 ----
-
- #ifdef SIGCHLD
-
- ! static TYPESIG chldser (sig, code, sc)
- int sig;
- long code;
- struct sigcontext *sc;
- {
- #if defined(BSD42) && !defined(WAITINT)
- union wait status;
- + #else
- + int status;
- #endif
-
- while (wait3 (&status, WNOHANG, NULLRP) > 0)
- *** ../mh-6.8/support/pop/popser.c Tue Dec 15 08:55:50 1992
- --- support/pop/popser.c Fri Feb 26 14:12:11 1993
- ***************
- *** 1,6 ****
- /* popser.c - the POP service */
- #ifndef lint
- ! static char ident[]="@(#)$Id: popser.c,v 1.29 1992/12/15 00:20:22 jromine Exp $";
- #endif
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* popser.c - the POP service */
- #ifndef lint
- ! static char ident[]="@(#)$Id: popser.c,v 1.30 1992/12/16 22:31:20 jromine Exp $";
- #endif
-
- #include "../h/mh.h"
- ***************
- *** 215,221 ****
- #define TRMLEN (sizeof TRM - 1)
- #define IAC 255
-
- ! static int pipeser ();
-
- FILE *input;
- FILE *output;
- --- 215,221 ----
- #define TRMLEN (sizeof TRM - 1)
- #define IAC 255
-
- ! static TYPESIG pipeser ();
-
- FILE *input;
- FILE *output;
- ***************
- *** 1861,1867 ****
-
- /* ARGSUSED */
-
- ! static int pipeser (sig, code, sc)
- int sig;
- long code;
- struct sigcontext *sc;
- --- 1861,1867 ----
-
- /* ARGSUSED */
-
- ! static TYPESIG pipeser (sig, code, sc)
- int sig;
- long code;
- struct sigcontext *sc;
- *** ../mh-6.8/support/pop/syslog.c Tue Dec 15 08:55:52 1992
- --- support/pop/syslog.c Wed Dec 16 13:49:23 1992
- ***************
- *** 3,9 ****
- static char SccsId[] = "@(#)syslog.c 4.1 (Berkeley) 5/27/83";
- #endif
- #ifndef lint
- ! static char ident[] = "@(#)$Id: syslog.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
-
- /*
- --- 3,9 ----
- static char SccsId[] = "@(#)syslog.c 4.1 (Berkeley) 5/27/83";
- #endif
- #ifndef lint
- ! static char ident[] = "@(#)$Id: syslog.c,v 1.8 1992/12/15 00:20:22 jromine Exp jromine $";
- #endif /* lint */
-
- /*
- *** ../mh-6.8/uip/aliasbr.c Tue Dec 15 08:55:53 1992
- --- uip/aliasbr.c Fri Feb 26 13:58:40 1993
- ***************
- *** 1,10 ****
- /* aliasbr.c - new aliasing mechanism */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: aliasbr.c,v 1.13 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- #include "../h/aliasbr.h"
- #include <ctype.h>
- #include <grp.h>
- #include <pwd.h>
- --- 1,13 ----
- /* aliasbr.c - new aliasing mechanism */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: aliasbr.c,v 1.14 1993/02/26 21:58:38 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- #include "../h/aliasbr.h"
- + #ifdef BSD44
- + #include <sys/types.h>
- + #endif
- #include <ctype.h>
- #include <grp.h>
- #include <pwd.h>
- *** ../mh-6.8/uip/bbc.c Tue Dec 15 08:55:54 1992
- --- uip/bbc.c Fri Feb 26 13:59:00 1993
- ***************
- *** 1,6 ****
- /* bbc.c - ZOTnet BBoard checker */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: bbc.c,v 2.12 1992/12/14 17:10:25 jromine Exp $";
- #endif lint
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* bbc.c - ZOTnet BBoard checker */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: bbc.c,v 2.13 1993/02/26 21:58:57 jromine Exp $";
- #endif lint
-
- #include "../h/mh.h"
- ***************
- *** 137,147 ****
- static char **getip ();
- #endif BPOP
-
- ! int sigser (), action ();
- ! int hupser ();
- #ifdef SIGTSTP
- int tstpid;
- ! static int tstpser ();
- #endif SIGTSTP
-
- static char *rcfile=NULL;
- --- 137,147 ----
- static char **getip ();
- #endif BPOP
-
- ! TYPESIG sigser (), hupser ();
- ! int action ();
- #ifdef SIGTSTP
- int tstpid;
- ! static TYPESIG tstpser ();
- #endif SIGTSTP
-
- static char *rcfile=NULL;
- ***************
- *** 693,699 ****
-
- /* ARGSUSED */
-
- ! int sigser (i)
- int i;
- {
- #ifndef BSD42
- --- 693,699 ----
-
- /* ARGSUSED */
-
- ! TYPESIG sigser (i)
- int i;
- {
- #ifndef BSD42
- ***************
- *** 705,711 ****
-
- /* ARGSUSED */
-
- ! int hupser (i)
- int i;
- {
- static int armed = 0;
- --- 705,711 ----
-
- /* ARGSUSED */
-
- ! TYPESIG hupser (i)
- int i;
- {
- static int armed = 0;
- ***************
- *** 813,819 ****
- /* */
-
- #ifdef SIGTSTP
- ! static int tstpser (sig)
- int sig;
- {
- int pid;
- --- 813,819 ----
- /* */
-
- #ifdef SIGTSTP
- ! static TYPESIG tstpser (sig)
- int sig;
- {
- int pid;
- *** ../mh-6.8/uip/ftpsbr.c Tue Dec 15 08:55:56 1992
- --- uip/ftpsbr.c Fri Aug 20 08:49:57 1993
- ***************
- *** 1,7 ****
- /* ftpsbr.c - simple FTP client library (why doesn't BSD have one?!?) */
-
- #ifndef lint
- ! static char ident[] = "@(#)$Id: ftpsbr.c,v 1.10 1992/12/03 16:50:27 jromine Exp $";
- #endif
-
- #include "../h/mh.h"
- --- 1,7 ----
- /* ftpsbr.c - simple FTP client library (why doesn't BSD have one?!?) */
-
- #ifndef lint
- ! static char ident[] = "@(#)$Id: ftpsbr.c,v 1.12 1993/08/20 15:49:47 jromine Exp $";
- #endif
-
- #include "../h/mh.h"
- ***************
- *** 49,57 ****
- #define u_long ulong
- #endif
-
- -
- - /* taken from ISODE's compat/internet.c */
- -
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- --- 49,54 ----
- ***************
- *** 64,114 ****
- #define inaddr_copy(hp,sin) \
- bcopy ((hp) -> h_addr, (char *) &((sin) -> sin_addr), (hp) -> h_length)
-
- - #ifndef DG
- - u_long inet_addr ();
- - #else
- - struct in_addr inet_addr ();
- - #endif
-
-
- - static char *empty = NULL;
- - #ifdef h_addr
- - static char *addrs[2] = { NULL };
- - #endif
- -
- - static struct hostent *gethostbystring (s)
- - char *s;
- - {
- - register struct hostent *h;
- - #ifndef DG
- - static u_long iaddr;
- - #else
- - static struct in_addr iaddr;
- - #endif
- - static struct hostent hs;
- -
- - iaddr = inet_addr (s);
- - #ifndef DG
- - if (iaddr == NOTOK && strcmp (s, "255.255.255.255"))
- - #else
- - if (iaddr.s_addr == NOTOK && strcmp (s, "255.255.255.255"))
- - #endif
- - return gethostbyname (s);
- -
- - h = &hs;
- - h -> h_name = s;
- - h -> h_aliases = ∅
- - h -> h_addrtype = AF_INET;
- - h -> h_length = sizeof (iaddr);
- - #ifdef h_addr
- - h -> h_addr_list = addrs;
- - bzero ((char *) addrs, sizeof addrs);
- - #endif
- - h -> h_addr = (char *) &iaddr;
- -
- - return h;
- - }
- -
- /* */
-
- extern int errno;
- --- 61,69 ----
- #define inaddr_copy(hp,sin) \
- bcopy ((hp) -> h_addr, (char *) &((sin) -> sin_addr), (hp) -> h_length)
-
-
- + struct hostent *gethostbystring ();
-
- /* */
-
- extern int errno;
- ***************
- *** 226,231 ****
- --- 181,204 ----
- int ascii,
- stayopen;
- {
- + return ftp_trans (host, user, password, cwd, remote, local, "RETR", ascii,
- + stayopen);
- + }
- +
- + /* */
- +
- + int ftp_trans (host, user, password, cwd, remote, local, cmd, ascii,
- + stayopen)
- + char *host,
- + *user,
- + *password,
- + *cwd,
- + *remote,
- + *local,
- + *cmd;
- + int ascii,
- + stayopen;
- + {
- int result;
-
- if (stayopen <= 0) {
- ***************
- *** 292,298 ****
- goto out;
- }
-
- ! result = ftp_read (remote, local, ascii);
-
- out: ;
- if (result != OK || !stayopen)
- --- 265,271 ----
- goto out;
- }
-
- ! result = ftp_read (remote, local, cmd, ascii);
-
- out: ;
- if (result != OK || !stayopen)
- ***************
- *** 319,344 ****
-
- /* */
-
- ! static int ftp_read (remote, local, ascii)
- char *remote,
- ! *local;
- int ascii;
- {
- register int cc;
- int expectingreply = 0;
- char buffer[BUFSIZ];
- ! FILE *fp;
-
- if (initconn () == NOTOK)
- goto bad;
-
- v_noise = v_verbose;
- ! if (command (-1, "RETR %s", remote) != PRELIM)
- goto bad;
-
- expectingreply++;
- if (dataconn () == NOTOK) {
- bad: ;
- if (data_fd != NOTOK)
- (void) close_tcp_socket (data_fd), data_fd = NOTOK;
- if (expectingreply)
- --- 292,322 ----
-
- /* */
-
- ! static int ftp_read (remote, local, cmd, ascii)
- char *remote,
- ! *local,
- ! *cmd;
- int ascii;
- {
- + int istdio = 0,
- + istore;
- register int cc;
- int expectingreply = 0;
- char buffer[BUFSIZ];
- ! FILE *fp = NULL;
-
- if (initconn () == NOTOK)
- goto bad;
-
- v_noise = v_verbose;
- ! if (command (-1, *remote ? "%s %s" : "%s", cmd, remote) != PRELIM)
- goto bad;
-
- expectingreply++;
- if (dataconn () == NOTOK) {
- bad: ;
- + if (fp && !istdio)
- + (void) fclose (fp);
- if (data_fd != NOTOK)
- (void) close_tcp_socket (data_fd), data_fd = NOTOK;
- if (expectingreply)
- ***************
- *** 347,407 ****
- return NOTOK;
- }
-
- ! if ((fp = fopen (local, "w")) == NULL) {
- ! perror (local);
- ! goto bad;
- ! }
-
- ! if (ascii) {
- ! int c;
- ! FILE *in;
- !
- ! if (!(in = fdopen (data_fd, "r"))) {
- ! perror ("fdopen");
- goto bad;
- }
- - while ((c = getc (in)) != EOF) {
- - if (c == '\r')
- - switch (c = getc (in)) {
- - case EOF:
- - case '\0':
- - c = '\r';
- - break;
-
- ! case '\n':
- ! break;
-
- ! default:
- ! (void) putc ('\r', fp);
- ! break;
- ! }
- !
- ! if (putc (c, fp) == EOF) {
- ! perror ("putc");
- ! (void) fclose (in);
- ! data_fd = NOTOK;
- goto bad;
- }
- }
-
- ! (void) fclose (in);
- ! data_fd = NOTOK;
- }
- else {
- ! while ((cc = read_tcp_socket (data_fd, buffer, sizeof buffer)) > 0)
- ! if (fwrite (buffer, sizeof *buffer, cc, fp) == 0) {
- ! perror ("fwrite");
- goto bad;
- }
- ! if (cc < 0) {
- ! perror ("read_tcp_socket");
- ! goto bad;
- }
-
- ! (void) close_tcp_socket (data_fd), data_fd = NOTOK;
- }
-
- ! (void) fclose (fp);
-
- v_noise = v_verbose;
- return (getreply (1, 0) == COMPLETE ? OK : NOTOK);
- --- 325,428 ----
- return NOTOK;
- }
-
- ! istore = !strcmp (cmd, "STOR");
-
- ! if (istdio = !strcmp (local, "-"))
- ! fp = istore ? stdin : stdout;
- ! else
- ! if ((fp = fopen (local, istore ? "r" : "w")) == NULL) {
- ! perror (local);
- goto bad;
- }
-
- ! if (istore) {
- ! if (ascii) {
- ! int c;
- ! FILE *out;
-
- ! if (!(out = fdopen (data_fd, "w"))) {
- ! perror ("fdopen");
- goto bad;
- }
- +
- + while ((c = getc (fp)) != EOF) {
- + if (c == '\n')
- + (void) putc ('\r', out);
- + if (putc (c, out) == EOF) {
- + perror ("putc");
- + (void) fclose (out);
- + data_fd = NOTOK;
- + goto bad;
- + }
- + }
- +
- + (void) fclose (out);
- + data_fd = NOTOK;
- }
- + else {
- + while ((cc = fread (buffer, sizeof *buffer, sizeof buffer, fp)) >0)
- + if (write_tcp_socket (data_fd, buffer, cc) != cc) {
- + perror ("write_tcp_socket");
- + goto bad;
- + }
-
- ! (void) close_tcp_socket (data_fd), data_fd = NOTOK;
- ! }
- }
- else {
- ! if (ascii) {
- ! int c;
- ! FILE *in;
- !
- ! if (!(in = fdopen (data_fd, "r"))) {
- ! perror ("fdopen");
- goto bad;
- }
- !
- ! while ((c = getc (in)) != EOF) {
- ! if (c == '\r')
- ! switch (c = getc (in)) {
- ! case EOF:
- ! case '\0':
- ! c = '\r';
- ! break;
- !
- ! case '\n':
- ! break;
- !
- ! default:
- ! (void) putc ('\r', fp);
- ! break;
- ! }
- !
- ! if (putc (c, fp) == EOF) {
- ! perror ("putc");
- ! (void) fclose (in);
- ! data_fd = NOTOK;
- ! goto bad;
- ! }
- ! }
- !
- ! (void) fclose (in);
- ! data_fd = NOTOK;
- }
- + else {
- + while ((cc = read_tcp_socket (data_fd, buffer, sizeof buffer)) > 0)
- + if (fwrite (buffer, sizeof *buffer, cc, fp) == 0) {
- + perror ("fwrite");
- + goto bad;
- + }
- + if (cc < 0) {
- + perror ("read_tcp_socket");
- + goto bad;
- + }
-
- ! (void) close_tcp_socket (data_fd), data_fd = NOTOK;
- ! }
- }
-
- ! if (!istdio)
- ! (void) fclose (fp);
-
- v_noise = v_verbose;
- return (getreply (1, 0) == COMPLETE ? OK : NOTOK);
- ***************
- *** 488,494 ****
-
- va_start (ap);
-
- ! val = _command (va_arg (ap, int), ap);
-
- va_end (ap);
-
- --- 509,516 ----
-
- va_start (ap);
-
- ! val = va_arg (ap, int);
- ! val = _command (val, ap);
-
- va_end (ap);
-
- *** ../mh-6.8/uip/inc.c Tue Dec 15 08:55:57 1992
- --- uip/inc.c Fri Aug 20 08:50:28 1993
- ***************
- *** 1,6 ****
- /* inc.c - incorporate messages from a maildrop into a folder */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: inc.c,v 1.20 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
-
- #ifdef MAILGROUP
- --- 1,6 ----
- /* inc.c - incorporate messages from a maildrop into a folder */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: inc.c,v 1.21 1993/08/20 15:50:13 jromine Exp $";
- #endif /* lint */
-
- #ifdef MAILGROUP
- ***************
- *** 408,418 ****
- }
- #ifdef POP
- else if (host) {
- ! if (rpop) {
- ! if (user == NULL)
- ! user = getusr ();
- pass = getusr ();
- - }
- else
- ruserpass (host, &user, &pass);
-
- --- 408,417 ----
- }
- #ifdef POP
- else if (host) {
- ! if (user == NULL)
- ! user = getusr ();
- ! if (rpop > 0)
- pass = getusr ();
- else
- ruserpass (host, &user, &pass);
-
- ***************
- *** 419,425 ****
- if (pop_init (host, user, pass, snoop, rpop) == NOTOK
- || pop_stat (&nmsgs, &nbytes) == NOTOK)
- adios (NULLCP, "%s", response);
- ! if (rpop)
- (void) setuid (getuid ());
- if (nmsgs == 0) {
- (void) pop_quit ();
- --- 418,424 ----
- if (pop_init (host, user, pass, snoop, rpop) == NOTOK
- || pop_stat (&nmsgs, &nbytes) == NOTOK)
- adios (NULLCP, "%s", response);
- ! if (rpop > 0)
- (void) setuid (getuid ());
- if (nmsgs == 0) {
- (void) pop_quit ();
- *** ../mh-6.8/uip/mhlsbr.c Tue Dec 15 08:55:58 1992
- --- uip/mhlsbr.c Fri Aug 20 08:50:50 1993
- ***************
- *** 1,6 ****
- /* mhlsbr.c - implement the "nifty" message lister */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mhlsbr.c,v 1.28 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* mhlsbr.c - implement the "nifty" message lister */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mhlsbr.c,v 1.29 1993/08/20 15:50:44 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- ***************
- *** 1532,1537 ****
- --- 1532,1540 ----
- #include <arpa/inet.h>
- #endif
-
- + struct hostent *gethostbystring ();
- +
- +
- static int doface (c1)
- register struct mcomp *c1;
- {
- ***************
- *** 1557,1570 ****
- return (inited = NOTOK);
- }
-
- ! if (hp = gethostbyname (ap[0]))
- ! bcopy (hp -> h_addr, (char *) &addr, addrlen = hp -> h_length);
- ! else
- ! if (iaddr = inet_addr (ap[0]))
- ! bcopy ((char *) &iaddr, (char *) &addr,
- ! addrlen = sizeof iaddr);
- ! else
- ! goto bad_faceproc;
-
- portno = htons ((u_short) atoi (ap[1]));
- free (cp);
- --- 1560,1568 ----
- return (inited = NOTOK);
- }
-
- ! if (!(hp = gethostbystring (ap[0])))
- ! goto bad_faceproc;
- ! bcopy (hp -> h_addr, (char *) &addr, addrlen = hp -> h_length);
-
- portno = htons ((u_short) atoi (ap[1]));
- free (cp);
- *** ../mh-6.8/uip/mhmail.c Tue Dec 15 08:55:58 1992
- --- uip/mhmail.c Fri Aug 20 08:51:34 1993
- ***************
- *** 1,6 ****
- /* mhmail.c - simple mail program */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mhmail.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* mhmail.c - simple mail program */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mhmail.c,v 1.9 1993/08/20 15:51:29 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- ***************
- *** 30,35 ****
- --- 30,37 ----
-
- #define RESNDSW 5
- "resent", -6,
- + #define QUEUESW 6
- + "queued", -6,
-
- NULL, 0
- };
- ***************
- *** 53,58 ****
- --- 55,62 ----
- status,
- i,
- iscc = 0,
- + nvec,
- + queued = 0,
- resent = 0,
- somebody;
- char *cp,
- ***************
- *** 62,68 ****
- *from = NULL,
- *body = NULL,
- **argp = argv + 1,
- ! buf[100];
- FILE * out;
-
- #ifdef LOCALE
- --- 66,73 ----
- *from = NULL,
- *body = NULL,
- **argp = argv + 1,
- ! buf[100],
- ! *vec[5];
- FILE * out;
-
- #ifdef LOCALE
- ***************
- *** 116,121 ****
- --- 121,130 ----
- case RESNDSW:
- resent++;
- continue;
- +
- + case QUEUESW:
- + queued++;
- + continue;
- }
- if (iscc)
- cclist = cclist ? add (cp, add (", ", cclist)) : getcpy (cp);
- ***************
- *** 164,169 ****
- --- 173,187 ----
-
- /* */
-
- + nvec = 0;
- + vec[nvec++] = r1bindex (postproc, '/');
- + vec[nvec++] = tmpfil;
- + if (resent)
- + vec[nvec++] = "-dist";
- + if (queued)
- + vec[nvec++] = "-queued";
- + vec[nvec] = 0;
- +
- for (i = 0; (child_id = fork ()) == NOTOK && i < 5; i++)
- sleep (5);
- switch (child_id) {
- ***************
- *** 170,178 ****
- case NOTOK: /* report failure and then send it */
- admonish (NULLCP, "unable to fork");
-
- ! case OK:
- ! execlp (postproc, r1bindex (postproc, '/'), tmpfil,
- ! resent ? "-dist" : NULLCP, NULLCP);
- fprintf (stderr, "unable to exec ");
- perror (postproc);
- _exit (-1);
- --- 188,195 ----
- case NOTOK: /* report failure and then send it */
- admonish (NULLCP, "unable to fork");
-
- ! case OK:
- ! execvp (postproc, vec);
- fprintf (stderr, "unable to exec ");
- perror (postproc);
- _exit (-1);
- *** ../mh-6.8/uip/mhn.c Tue Dec 15 08:55:59 1992
- --- uip/mhn.c Fri Aug 20 08:52:32 1993
- ***************
- *** 1,6 ****
- /* mhn.c - multi-media MH */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mhn.c,v 2.21 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* mhn.c - multi-media MH */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mhn.c,v 2.22 1993/08/20 15:52:01 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- ***************
- *** 21,117 ****
- /* */
-
- static struct swit switches[] = {
- ! #define AUTOSW 0
- "auto", 0,
- ! #define NAUTOSW 1
- "noauto", 0,
-
- ! #define DEBUGSW 2
- "debug", -5,
-
- ! #define EBCDICSW 3
- "ebcdicsafe", 0,
- ! #define NEBCDICSW 4
- "noebcdicsafe", 0,
-
- ! #define FORMSW 5
- "form formfile", 4,
-
- ! #define HEADSW 6
- "headers", 0,
- ! #define NHEADSW 7
- "noheaders", 0,
-
- ! #define LISTSW 8
- "list", 0,
- ! #define NLISTSW 9
- "nolist", 0,
-
- ! #define PARTSW 10
- "part number", 0,
-
- ! #define SIZESW 11
- "realsize", 0,
- ! #define NSIZESW 12
- "norealsize", 0,
-
- ! #define RFC934SW 13
- "rfc934mode", 0,
- ! #define NRFC934SW 14
- "norfc934mode", 0,
-
- ! #define SERIALSW 15
- "serialonly", 0,
- ! #define NSERIALSW 16
- "noserialonly", 0,
-
- ! #define SHOWSW 17
- "show", 0,
- ! #define NSHOWSW 18
- "noshow", 0,
-
- ! #define STORESW 19
- "store", 0,
- ! #define NSTORESW 20
- "nostore", 0,
-
- ! #define TYPESW 21
- "type content", 0,
-
- ! #define VERBSW 22
- "verbose", 0,
- ! #define NVERBSW 23
- "noverbose", 0,
-
- ! #define HELPSW 24
- "help", 4,
-
- ! #define PROGSW 25
- "moreproc program", -4,
- ! #define NPROGSW 26
- "nomoreproc", -3,
-
- ! #define LENSW 27
- "length lines", -4,
- ! #define WIDSW 28
- "width columns", -4,
-
- ! #define FILESW 29 /* interface from show */
- "file file", -4,
-
- ! #define VIAMSW 30
- "viamail mailpath", -7,
- ! #define VIASSW 31
- "viasubj subject", -7,
- ! #define VIAPSW 32
- "viaparm arguments", -7,
- ! #define VIADSW 33
- "viadesc text", -7,
- ! #define VIACSW 34
- "viacmnt text", -7,
- ! #define VIAZSW 35
- "viadelay seconds", -8,
- ! #define VIAFSW 36
- "viafrom mailpath", -7,
-
- NULL, 0
- --- 21,130 ----
- /* */
-
- static struct swit switches[] = {
- ! #define AUTOSW 0
- "auto", 0,
- ! #define NAUTOSW 1
- "noauto", 0,
-
- ! #define CACHESW 2
- ! "cache policy", 0,
- !
- ! #define CHECKSW 3
- ! "check", 0,
- ! #define NCHECKSW 4
- ! "nocheck", 0,
- !
- ! #define DEBUGSW 5
- "debug", -5,
-
- ! #define EBCDICSW 6
- "ebcdicsafe", 0,
- ! #define NEBCDICSW 7
- "noebcdicsafe", 0,
-
- ! #define FORMSW 8
- "form formfile", 4,
-
- ! #define HEADSW 9
- "headers", 0,
- ! #define NHEADSW 10
- "noheaders", 0,
-
- ! #define LISTSW 11
- "list", 0,
- ! #define NLISTSW 12
- "nolist", 0,
-
- ! #define PARTSW 13
- "part number", 0,
-
- ! #define PAUSESW 14
- ! "pause", 0,
- ! #define NPAUSESW 15
- ! "nopause", 0,
- !
- ! #define SIZESW 16
- "realsize", 0,
- ! #define NSIZESW 17
- "norealsize", 0,
-
- ! #define RFC934SW 18
- "rfc934mode", 0,
- ! #define NRFC934SW 19
- "norfc934mode", 0,
-
- ! #define SERIALSW 20
- "serialonly", 0,
- ! #define NSERIALSW 21
- "noserialonly", 0,
-
- ! #define SHOWSW 22
- "show", 0,
- ! #define NSHOWSW 23
- "noshow", 0,
-
- ! #define STORESW 24
- "store", 0,
- ! #define NSTORESW 25
- "nostore", 0,
-
- ! #define TYPESW 26
- "type content", 0,
-
- ! #define VERBSW 27
- "verbose", 0,
- ! #define NVERBSW 28
- "noverbose", 0,
-
- ! #define HELPSW 29
- "help", 4,
-
- ! #define PROGSW 30
- "moreproc program", -4,
- ! #define NPROGSW 31
- "nomoreproc", -3,
-
- ! #define LENSW 32
- "length lines", -4,
- ! #define WIDSW 33
- "width columns", -4,
-
- ! #define FILESW 34 /* interface from show */
- "file file", -4,
-
- ! #define VIAMSW 35
- "viamail mailpath", -7,
- ! #define VIASSW 36
- "viasubj subject", -7,
- ! #define VIAPSW 37
- "viaparm arguments", -7,
- ! #define VIADSW 38
- "viadesc text", -7,
- ! #define VIACSW 39
- "viacmnt text", -7,
- ! #define VIAZSW 40
- "viadelay seconds", -8,
- ! #define VIAFSW 41
- "viafrom mailpath", -7,
-
- NULL, 0
- ***************
- *** 122,128 ****
- --- 135,154 ----
- #define NPARTS 50
- #define NTYPES 20
-
- + static struct swit caches[] = {
- + #define CACHE_ALWAYS 0
- + "always", 0,
- + #define CACHE_ASK 1
- + "ask", 0,
- + #define CACHE_NEVER 2
- + "never", 0,
- +
- + NULL, 0
- + };
- +
- static int autosw = 0;
- + static int cachesw = CACHE_ASK;
- + static int checksw = 0;
- int debugsw = 0;
- static int ebcdicsw = 0;
- static char *formsw = NULLCP;
- ***************
- *** 131,136 ****
- --- 157,163 ----
- static int nomore = 0;
- static int npart = 0;
- static char *parts[NPARTS + 1];
- + static int pausesw = 1;
- static char *progsw = NULLCP;
- static int rfc934sw = 1;
- static int serialsw = 0;
- ***************
- *** 219,225 ****
- caddr_t c_ctextern; /* .. */
- char *c_showproc; /* default, if not in profile */
- char *c_termproc; /* for charset madness... */
- ! char *c_storeproc; /* default, if not in profile */
-
- int (*c_ctinitfnx) (); /* parse content */
- int (*c_ctlistfnx) (); /* list content */
- --- 246,252 ----
- caddr_t c_ctextern; /* .. */
- char *c_showproc; /* default, if not in profile */
- char *c_termproc; /* for charset madness... */
- ! char *c_storeproc; /* overrides profile entry, if any */
-
- int (*c_ctinitfnx) (); /* parse content */
- int (*c_ctlistfnx) (); /* list content */
- ***************
- *** 253,258 ****
- --- 280,287 ----
- char *c_id; /* Content-ID: */
- char *c_descr; /* Content-Description: */
-
- + int c_digested; /* Content-MD5: */
- + unsigned char c_digest[16]; /* .. */
-
- FILE *c_fp; /* read contents (stream) */
- char *c_file; /* read contents (file) */
- ***************
- *** 280,286 ****
- --- 309,317 ----
- #endif
-
- static int init_encoding(), type_ok(), copy_some_headers(), set_endian();
- + static int make_intermediates ();
- static int write7Bit(), writeQuoted(), writeBase64(), writeBase64aux();
- + static int writeDigest (), readDigest ();
- static int via_mail(), via_post(), pidcheck();
-
- static CT *cts = NULL;
- ***************
- *** 359,364 ****
- --- 390,416 ----
- autosw = 0;
- continue;
-
- + case CACHESW:
- + if (!(cp = *argp++) || *cp == '-')
- + adios (NULLCP, "missing argument to %s", argp[-2]);
- + switch (cachesw = smatch (cp, caches)) {
- + case AMBIGSW:
- + ambigsw (cp, caches);
- + done (1);
- + case UNKWNSW:
- + adios (NULLCP, "%s unknown", cp);
- + default:
- + break;
- + }
- + continue;
- +
- + case CHECKSW:
- + checksw++;
- + continue;
- + case NCHECKSW:
- + checksw = 0;
- + continue;
- +
- case DEBUGSW:
- debugsw++;
- continue;
- ***************
- *** 402,407 ****
- --- 454,466 ----
- parts[npart++] = cp;
- continue;
-
- + case PAUSESW:
- + pausesw++;
- + continue;
- + case NPAUSESW:
- + pausesw = 0;
- + continue;
- +
- case RFC934SW:
- rfc934sw++;
- continue;
- ***************
- *** 527,533 ****
- /* NOTREACHED */
- }
- else
- ! if (f2 || f3 || f4 || f5 || f6)
- adios (NULLCP, "missing -viamail \"mailpath\" switch");
-
- if (cp = getenv ("MHN")) {
- --- 586,592 ----
- /* NOTREACHED */
- }
- else
- ! if (f2 || f3 || f4 || f5 || f6 || f7)
- adios (NULLCP, "missing -viamail \"mailpath\" switch");
-
- if (cp = getenv ("MHN")) {
- ***************
- *** 546,552 ****
- }
-
- (void) sprintf (buf, "%s-cache", invo_name);
- ! cache = m_find (buf);
-
- cwdlen = strlen (cwd = getcpy (pwd ()));
- (void) sprintf (buf, "%s-storage", invo_name);
- --- 605,611 ----
- }
-
- (void) sprintf (buf, "%s-cache", invo_name);
- ! cache = cachesw != CACHE_NEVER ? m_find (buf) : NULLCP;
-
- cwdlen = strlen (cwd = getcpy (pwd ()));
- (void) sprintf (buf, "%s-storage", invo_name);
- ***************
- *** 817,823 ****
- /* NOTREACHED */
-
- default:
- ! xpid = child_id;
- break;
- }
-
- --- 876,882 ----
- /* NOTREACHED */
-
- default:
- ! xpid = -child_id;
- break;
- }
-
- ***************
- *** 896,912 ****
- };
-
-
- ! static int InitApplication (), InitMessage (), InitMultiPart (), InitText ();
-
-
- static struct str2init str2cts[] = {
- "application", CT_APPLICATION, InitApplication,
- ! "audio", CT_AUDIO, NULL,
- ! "image", CT_IMAGE, NULL,
- "message", CT_MESSAGE, InitMessage,
- "multipart", CT_MULTIPART, InitMultiPart,
- "text", CT_TEXT, InitText,
- ! "video", CT_VIDEO, NULL,
-
- NULL, CT_EXTENSION, NULL, /* these two must be last! */
- NULL, CT_UNKNOWN, NULL,
- --- 955,972 ----
- };
-
-
- ! static int InitApplication (), InitMessage (), InitMultiPart (), InitText (),
- ! InitGeneric ();
-
-
- static struct str2init str2cts[] = {
- "application", CT_APPLICATION, InitApplication,
- ! "audio", CT_AUDIO, InitGeneric,
- ! "image", CT_IMAGE, InitGeneric,
- "message", CT_MESSAGE, InitMessage,
- "multipart", CT_MULTIPART, InitMultiPart,
- "text", CT_TEXT, InitText,
- ! "video", CT_VIDEO, InitGeneric,
-
- NULL, CT_EXTENSION, NULL, /* these two must be last! */
- NULL, CT_UNKNOWN, NULL,
- ***************
- *** 952,958 ****
- compnum++;
-
- if (uleq (name, VRSN_FIELD)) {
- ! register char *cp;
-
- cp = add (buf, NULLCP);
- while (state == FLDPLUS) {
- --- 1012,1021 ----
- compnum++;
-
- if (uleq (name, VRSN_FIELD)) {
- ! int ucmp;
- ! char c,
- ! *cp,
- ! *dp;
-
- cp = add (buf, NULLCP);
- while (state == FLDPLUS) {
- ***************
- *** 961,971 ****
- }
-
- if (ct -> c_vrsn) {
- - char *dp = trimcpy (cp);
- -
- advise (NULLCP,
- "message %s has multiple %s: fields (%s)",
- ! ct -> c_file, VRSN_FIELD, dp);
- free (dp);
- free (cp);
- goto out;
- --- 1024,1032 ----
- }
-
- if (ct -> c_vrsn) {
- advise (NULLCP,
- "message %s has multiple %s: fields (%s)",
- ! ct -> c_file, VRSN_FIELD, dp = trimcpy (cp));
- free (dp);
- free (cp);
- goto out;
- ***************
- *** 972,993 ****
- }
-
- ct -> c_vrsn = cp;
- - #ifdef whocares
- while (isspace (*cp))
- cp++;
- for (dp = cp; istoken (*dp); dp++)
- continue;
- ! c = *dp, *dp = NULL;
- ! if (!uleq (cp, VRSN_VALUE)) {
- ! if (!isspace (c))
- ! *dp = c;
- ! advise (NULLCP,
- ! "message %s has unsupported value for %s: field (%s)",
- ! ct -> c_file, VRSN_FIELD, cp);
- ! goto out;
- ! }
- *dp = c;
- ! #endif
- goto got_header;
- }
-
- --- 1033,1061 ----
- }
-
- ct -> c_vrsn = cp;
- while (isspace (*cp))
- cp++;
- + for (dp = index (cp, '\n'); dp; dp = index (dp, '\n'))
- + *dp++ = ' ';
- + for (dp = cp + strlen (cp) - 1; dp >= cp; dp--)
- + if (!isspace (*dp))
- + break;
- + *++dp = '\0';
- + if (debugsw)
- + fprintf (stderr, "%s: %s\n", VRSN_FIELD, cp);
- +
- + if (*cp == '(' && get_comment (ct, &cp, 0) == NOTOK)
- + goto out;
- +
- for (dp = cp; istoken (*dp); dp++)
- continue;
- ! c = *dp, *dp = '\0';
- ! ucmp = uleq (cp, VRSN_VALUE);
- *dp = c;
- ! if (!ucmp)
- ! admonish (NULLCP,
- ! "message %s has unknown value for %s: field (%s)",
- ! ct -> c_file, VRSN_FIELD, cp);
- goto got_header;
- }
-
- ***************
- *** 1083,1088 ****
- --- 1151,1209 ----
- goto got_header;
- }
-
- + if (uleq (name, MD5_FIELD)) {
- + char *cp,
- + *dp,
- + *ep;
- +
- + cp = add (buf, NULLCP);
- + while (state == FLDPLUS) {
- + state = m_getfld (state, name, buf, sizeof buf, in);
- + cp = add (buf, cp);
- + }
- +
- + if (!checksw) {
- + free (cp);
- + goto got_header;
- + }
- +
- + if (ct -> c_digested) {
- + advise (NULLCP,
- + "message %s has multiple %s: fields (%s)",
- + ct -> c_file, MD5_FIELD,
- + dp = trimcpy (cp));
- + free (dp);
- + free (cp);
- + goto out;
- + }
- +
- + ep = cp;
- + while (isspace (*cp))
- + cp++;
- + for (dp = index (cp, '\n'); dp; dp = index (dp, '\n'))
- + *dp++ = ' ';
- + for (dp = cp + strlen (cp) - 1; dp >= cp; dp--)
- + if (!isspace (*dp))
- + break;
- + *++dp = '\0';
- + if (debugsw)
- + fprintf (stderr, "%s: %s\n", MD5_FIELD, cp);
- +
- + if (*cp == '(' && get_comment (ct, &cp, 0) == NOTOK) {
- + free (ep);
- + goto out;
- + }
- +
- + for (dp = cp; *dp && !isspace (*dp); dp++)
- + continue;
- + *dp = '\0';
- +
- + (void) readDigest (ct, cp);
- + free (ep);
- + ct -> c_digested++;
- + goto got_header;
- + }
- +
- #ifdef notdef
- if (uprf (name, XXX_FIELD_PRF))
- advise (NULLCP, "unknown field (%s) in message %s",
- ***************
- *** 1177,1183 ****
- if (debugsw)
- fprintf (stderr, "%s: %s\n", TYPE_FIELD, cp);
-
- ! if (*cp == '(' && get_comment (ct, &cp) == NOTOK)
- return NOTOK;
-
- for (dp = cp; istoken (*dp); dp++)
- --- 1298,1304 ----
- if (debugsw)
- fprintf (stderr, "%s: %s\n", TYPE_FIELD, cp);
-
- ! if (*cp == '(' && get_comment (ct, &cp, 1) == NOTOK)
- return NOTOK;
-
- for (dp = cp; istoken (*dp); dp++)
- ***************
- *** 1199,1205 ****
- while (isspace (*cp))
- cp++;
-
- ! if (*cp == '(' && get_comment (ct, &cp) == NOTOK)
- return NOTOK;
-
- if (*cp != '/') {
- --- 1320,1326 ----
- while (isspace (*cp))
- cp++;
-
- ! if (*cp == '(' && get_comment (ct, &cp, 1) == NOTOK)
- return NOTOK;
-
- if (*cp != '/') {
- ***************
- *** 1212,1218 ****
- while (isspace (*cp))
- cp++;
-
- ! if (*cp == '(' && get_comment (ct, &cp) == NOTOK)
- return NOTOK;
-
- for (dp = cp; istoken (*dp); dp++)
- --- 1333,1339 ----
- while (isspace (*cp))
- cp++;
-
- ! if (*cp == '(' && get_comment (ct, &cp, 1) == NOTOK)
- return NOTOK;
-
- for (dp = cp; istoken (*dp); dp++)
- ***************
- *** 1236,1242 ****
- while (isspace (*cp))
- cp++;
-
- ! if (*cp == '(' && get_comment (ct, &cp) == NOTOK)
- return NOTOK;
-
- ep = (ap = ci -> ci_attrs) + NPARMS;
- --- 1357,1363 ----
- while (isspace (*cp))
- cp++;
-
- ! if (*cp == '(' && get_comment (ct, &cp, 1) == NOTOK)
- return NOTOK;
-
- ep = (ap = ci -> ci_attrs) + NPARMS;
- ***************
- *** 1255,1261 ****
- while (isspace (*cp))
- cp++;
-
- ! if (*cp == '(' && get_comment (ct, &cp) == NOTOK)
- return NOTOK;
-
- if (*cp == 0) {
- --- 1376,1382 ----
- while (isspace (*cp))
- cp++;
-
- ! if (*cp == '(' && get_comment (ct, &cp, 1) == NOTOK)
- return NOTOK;
-
- if (*cp == 0) {
- ***************
- *** 1325,1331 ****
- while (isspace (*cp))
- cp++;
-
- ! if (*cp == '(' && get_comment (ct, &cp) == NOTOK)
- return NOTOK;
- }
-
- --- 1446,1452 ----
- while (isspace (*cp))
- cp++;
-
- ! if (*cp == '(' && get_comment (ct, &cp, 1) == NOTOK)
- return NOTOK;
- }
-
- ***************
- *** 1365,1373 ****
-
- /* */
-
- ! static int get_comment (ct, ap)
- CT ct;
- char **ap;
- {
- register int i;
- register char *bp,
- --- 1486,1495 ----
-
- /* */
-
- ! static int get_comment (ct, ap, istype)
- CT ct;
- char **ap;
- + int istype;
- {
- register int i;
- register char *bp,
- ***************
- *** 1386,1392 ****
- case '\0':
- invalid: ;
- advise (NULLCP, "invalid comment in message %s's %s: field",
- ! ct -> c_file, TYPE_FIELD);
- return NOTOK;
-
- case '\\':
- --- 1508,1514 ----
- case '\0':
- invalid: ;
- advise (NULLCP, "invalid comment in message %s's %s: field",
- ! ct -> c_file, istype ? TYPE_FIELD : VRSN_FIELD);
- return NOTOK;
-
- case '\\':
- ***************
- *** 1413,1424 ****
- }
- *bp = '\0';
-
- ! if (dp = ci -> ci_comment) {
- ! ci -> ci_comment = concat (dp, " ", buffer, NULLCP);
- ! free (dp);
- }
- - else
- - ci -> ci_comment = add (buffer, NULLCP);
-
- while (isspace (*cp))
- cp++;
- --- 1535,1548 ----
- }
- *bp = '\0';
-
- ! if (istype) {
- ! if (dp = ci -> ci_comment) {
- ! ci -> ci_comment = concat (dp, " ", buffer, NULLCP);
- ! free (dp);
- ! }
- ! else
- ! ci -> ci_comment = add (buffer, NULLCP);
- }
-
- while (isspace (*cp))
- cp++;
- ***************
- *** 1501,1507 ****
- fprintf (stderr, " partno \"%s\"\n", empty (ct -> c_partno));
-
- if (ct -> c_vrsn)
- ! fprintf (stderr, " %s:%s", VRSN_FIELD, ct -> c_vrsn);
-
- if (ct -> c_ctline)
- fprintf (stderr, " %s:%s", TYPE_FIELD, ct -> c_ctline);
- --- 1625,1631 ----
- fprintf (stderr, " partno \"%s\"\n", empty (ct -> c_partno));
-
- if (ct -> c_vrsn)
- ! fprintf (stderr, " %s:%s\n", VRSN_FIELD, ct -> c_vrsn);
-
- if (ct -> c_ctline)
- fprintf (stderr, " %s:%s", TYPE_FIELD, ct -> c_ctline);
- ***************
- *** 1776,1782 ****
- break;
-
- case 'p': /* pause prior to displaying content */
- ! xpause = 1;
- /* and fall... */
- case 'l': /* display listing prior to displaying
- content */
- --- 1900,1906 ----
- break;
-
- case 'p': /* pause prior to displaying content */
- ! xpause = pausesw;
- /* and fall... */
- case 'l': /* display listing prior to displaying
- content */
- ***************
- *** 1823,1829 ****
- fprintf (stderr, " using command %s\n", buffer);
- }
-
- ! if (xtty && xpid) {
- (void) pidcheck (pidwait (xpid, NOTOK));
- xpid = 0;
- }
- --- 1947,1955 ----
- fprintf (stderr, " using command %s\n", buffer);
- }
-
- ! if (xpid < 0 || (xtty && xpid)) {
- ! if (xpid < 0)
- ! xpid = -xpid;
- (void) pidcheck (pidwait (xpid, NOTOK));
- xpid = 0;
- }
- ***************
- *** 2104,2109 ****
- --- 2230,2239 ----
- }
- */
-
- + if (index (ct -> c_storage, '/')
- + && make_intermediates (ct -> c_storage) == NOTOK)
- + return NOTOK;
- +
- if (ct -> c_encoding != CE_7BIT) {
- int cc,
- fd;
- ***************
- *** 2234,2239 ****
- --- 2364,2370 ----
-
- default:
- if (!uprf (buffer, XXX_FIELD_PRF)
- + && !uprf (buffer, "Encrypted:")
- && !uprf (buffer, "Message-ID:")) {
- appending = -1;
- buffer[0] = 0;
- ***************
- *** 2278,2284 ****
- case FLD:
- case FLDPLUS:
- case FLDEOF:
- ! if (uprf (name, XXX_FIELD_PRF) || uleq (name, "Message-ID")) {
- while (state == FLDPLUS)
- state = m_getfld (state, name, buf, sizeof buf, in);
- continue;
- --- 2409,2417 ----
- case FLD:
- case FLDPLUS:
- case FLDEOF:
- ! if (uprf (name, XXX_FIELD_PRF)
- ! || uleq (name, "Encrypted")
- ! || uleq (name, "Message-ID")) {
- while (state == FLDPLUS)
- state = m_getfld (state, name, buf, sizeof buf, in);
- continue;
- ***************
- *** 2311,2316 ****
- --- 2444,2489 ----
- return OK;
- }
-
- +
- + static int make_intermediates (file)
- + char *file;
- + {
- + register char *cp;
- +
- + for (cp = file; cp = index (cp, '/'); cp++) {
- + struct stat st;
- +
- + *cp = NULL;
- +
- + if (stat (file, &st) == NOTOK) {
- + int answer;
- + char *ep;
- +
- + if (errno != ENOENT) {
- + advise (file, "error on directory");
- + losing_directory: ;
- + *cp = '/';
- + return NOTOK;
- + }
- +
- + ep = concat ("Create directory \"", file, "\"? ", NULLCP);
- + answer = getanswer (ep);
- + free (ep);
- +
- + if (!answer)
- + goto losing_directory;
- + if (!makedir (file)) {
- + advise (NULLCP, "unable to create directory %s", file);
- + goto losing_directory;
- + }
- + }
- +
- + *cp = '/';
- + }
- +
- + return OK;
- + }
- +
- /* */
-
- static void free_ctinfo (ct)
- ***************
- *** 2427,2432 ****
- --- 2600,2628 ----
- int kv_value;
- };
-
- +
- + static int InitGeneric (ct)
- + register CT ct;
- + {
- + register char **ap,
- + **ep;
- + register CI ci = &ct -> c_ctinfo;
- +
- + for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++)
- + if (autosw && !ct -> c_storeproc && uleq (*ap, "x-name")) {
- + register char *cp;
- +
- + if (*(cp = *ep) != '/'
- + && *cp != '.'
- + && *cp != '|'
- + && *cp != '!'
- + && !index (cp, '%'))
- + ct -> c_storeproc = add (cp, NULLCP);
- + }
- +
- + return OK;
- + }
- +
- /* TEXT */
-
- #define TEXT_UNKNOWN 0x00
- ***************
- *** 2489,2495 ****
- }
-
- for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++)
- ! if (uleq (*ap, "charset")) {
- char *cp;
- register struct text *t;
-
- --- 2685,2691 ----
- }
-
- for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++)
- ! if (!ct -> c_ctparams && uleq (*ap, "charset")) {
- char *cp;
- register struct text *t;
-
- ***************
- *** 2510,2519 ****
- if ((!mm_charset || !uleq (mm_charset, *ep))
- && (cp = m_find (buffer)))
- ct -> c_termproc = getcpy (cp);
- -
- - break;
- }
-
- return OK;
- }
-
- --- 2706,2724 ----
- if ((!mm_charset || !uleq (mm_charset, *ep))
- && (cp = m_find (buffer)))
- ct -> c_termproc = getcpy (cp);
- }
- + else
- + if (autosw && !ct -> c_storeproc && uleq (*ap, "x-name")) {
- + register char *cp;
-
- + if (*(cp = *ep) != '/'
- + && *cp != '.'
- + && *cp != '|'
- + && *cp != '!'
- + && !index (cp, '%'))
- + ct -> c_storeproc = add (cp, NULLCP);
- + }
- +
- return OK;
- }
-
- ***************
- *** 3130,3135 ****
- --- 3335,3341 ----
- char *eb_mode;
-
- char *eb_server;
- + char *eb_subject;
- char *eb_body;
-
- unsigned long
- ***************
- *** 3212,3217 ****
- --- 3418,3427 ----
- e -> eb_server = *ep;
- continue;
- }
- + if (uleq (*ap, "subject")) {
- + e -> eb_subject = *ep;
- + continue;
- + }
- if (composing && uleq (*ap, "body")) {
- e -> eb_body = getcpy (*ep);
- continue;
- ***************
- *** 3245,3250 ****
- --- 3455,3462 ----
- printf ("\t from %s\n", e -> eb_site);
- if (e -> eb_server)
- printf ("\t from mailbox %s\n", e -> eb_server);
- + if (e -> eb_subject)
- + printf ("\t with subject %s\n", e -> eb_subject);
- printf ("\t using %s", e -> eb_access);
- if (e -> eb_mode)
- printf (" (in %s mode)", e -> eb_mode);
- ***************
- *** 3527,3534 ****
-
- #define APPLICATION_UNKNOWN 0x00
- #define APPLICATION_OCTETS 0x01
- ! #define APPLICATION_ODA 0x02
- ! #define APPLICATION_POSTSCRIPT 0x03
-
-
- static int list_application (ct, toplevel)
- --- 3739,3745 ----
-
- #define APPLICATION_UNKNOWN 0x00
- #define APPLICATION_OCTETS 0x01
- ! #define APPLICATION_POSTSCRIPT 0x02
-
-
- static int list_application (ct, toplevel)
- ***************
- *** 3551,3557 ****
-
- static struct k2v SubApplication[] = {
- "octet-stream", APPLICATION_OCTETS,
- - "oda", APPLICATION_ODA,
- "postscript", APPLICATION_POSTSCRIPT,
- NULL, APPLICATION_UNKNOWN /* this one must be last! */
- };
- --- 3762,3767 ----
- ***************
- *** 3570,3588 ****
- if (uleq (ci -> ci_subtype, kv -> kv_key))
- break;
-
- ! if (autosw && !ct -> c_storeproc)
- ! for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++)
- ! if (uleq (*ap, "name")) {
- ! register char *cp;
-
- ! if (*(cp = *ep) != '/'
- ! && *cp != '.'
- ! && *cp != '|'
- ! && *cp != '!'
- ! && !index (cp, '%'))
- ! ct -> c_storeproc = add (cp, NULLCP);
- ! break;
- ! }
-
- if ((ct -> c_subtype = kv -> kv_value) == APPLICATION_OCTETS) {
- int tarP,
- --- 3780,3796 ----
- if (uleq (ci -> ci_subtype, kv -> kv_key))
- break;
-
- ! for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++)
- ! if (autosw && !ct -> c_storeproc && uleq (*ap, "x-name")) {
- ! register char *cp;
-
- ! if (*(cp = *ep) != '/'
- ! && *cp != '.'
- ! && *cp != '|'
- ! && *cp != '!'
- ! && !index (cp, '%'))
- ! ct -> c_storeproc = add (cp, NULLCP);
- ! }
-
- if ((ct -> c_subtype = kv -> kv_value) == APPLICATION_OCTETS) {
- int tarP,
- ***************
- *** 3598,3604 ****
- continue;
- }
-
- ! if (uleq (*ap, "conversions")
- && (uleq (*ep, "compress") || uleq (*ep, "x-compress"))) {
- zP = 1;
- continue;
- --- 3806,3812 ----
- continue;
- }
-
- ! if ((uleq (*ap, "conversions") || uleq (*ap, "x-conversions"))
- && (uleq (*ep, "compress") || uleq (*ep, "x-compress"))) {
- zP = 1;
- continue;
- ***************
- *** 3625,3630 ****
- --- 3833,3841 ----
-
- /* ENCODINGS */
-
- + #include "md5.c"
- +
- +
- struct cefile {
- char *ce_file;
- int ce_unlink;
- ***************
- *** 3773,3778 ****
- --- 3984,3990 ----
- {
- int bitno,
- cc,
- + digested,
- fd,
- len,
- skip;
- ***************
- *** 3786,3791 ****
- --- 3998,4004 ----
- *b3 = &b[endian > 0 ? 3 : 0];
- char buffer[BUFSIZ];
- register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
- + MD5_CTX mdContext;
-
- if (ce -> ce_fp)
- goto ready_to_go;
- ***************
- *** 3817,3822 ****
- --- 4030,4038 ----
- return NOTOK;
- }
-
- + if (digested = ct -> c_digested)
- + MD5Init (&mdContext);
- +
- (void) lseek (fd = fileno (ct -> c_fp), ct -> c_begin, 0);
- bitno = 18, bits = 0L, skip = 0;
- while (len > 0)
- ***************
- *** 3856,3865 ****
- test_end: ;
- if ((bitno -= 6) < 0) {
- (void) putc ((char) *b1, ce -> ce_fp);
- if (skip < 2) {
- (void) putc ((char) *b2, ce -> ce_fp);
- ! if (skip < 1)
- (void) putc ((char) *b3, ce -> ce_fp);
- }
-
- if (ferror (ce -> ce_fp)) {
- --- 4072,4088 ----
- test_end: ;
- if ((bitno -= 6) < 0) {
- (void) putc ((char) *b1, ce -> ce_fp);
- + if (digested)
- + MD5Update (&mdContext, b1, 1);
- if (skip < 2) {
- (void) putc ((char) *b2, ce -> ce_fp);
- ! if (digested)
- ! MD5Update (&mdContext, b2, 1);
- ! if (skip < 1) {
- (void) putc ((char) *b3, ce -> ce_fp);
- + if (digested)
- + MD5Update (&mdContext, b3, 1);
- + }
- }
-
- if (ferror (ce -> ce_fp)) {
- ***************
- *** 3892,3897 ****
- --- 4115,4133 ----
- goto clean_up;
- }
-
- + if (digested) {
- + unsigned char digest[16];
- +
- + MD5Final (digest, &mdContext);
- + if (bcmp ((char *) digest, (char *) ct -> c_digest,
- + sizeof digest / sizeof digest[0]))
- + content_error (NULLCP, ct,
- + "content integrity suspect (digest mismatch) -- continuing");
- + else
- + if (debugsw)
- + fprintf (stderr, "content integrity confirmed\n");
- + }
- +
- ready_to_go: ;
- (void) fseek (ce -> ce_fp, 0L, 0);
- *file = ce -> ce_file;
- ***************
- *** 3954,3959 ****
- --- 4190,4196 ----
- char **file;
- {
- int cc,
- + digested,
- len,
- quoted;
- register char *cp,
- ***************
- *** 3961,3966 ****
- --- 4198,4204 ----
- char buffer[BUFSIZ];
- unsigned char mask;
- register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
- + MD5_CTX mdContext;
-
- if (ce -> ce_fp)
- goto ready_to_go;
- ***************
- *** 3992,3997 ****
- --- 4230,4238 ----
- return NOTOK;
- }
-
- + if (digested = ct -> c_digested)
- + MD5Init (&mdContext);
- +
- (void) fseek (ct -> c_fp, ct -> c_begin, 0);
- quoted = 0;
- #ifdef lint
- ***************
- *** 4025,4035 ****
- --- 4266,4281 ----
- mask <<= 4;
- mask |= hex2nib[*cp & 0x7f];
- (void) putc (mask, ce -> ce_fp);
- + if (digested)
- + MD5Update (&mdContext, &mask, 1);
- }
- else
- switch (*cp) {
- case ':':
- (void) putc (*cp, ce -> ce_fp);
- + if (digested)
- + MD5Update (&mdContext, (unsigned char *) ":",
- + 1);
- break;
-
- default:
- ***************
- *** 4066,4071 ****
- --- 4312,4323 ----
- case '\t':
- case '\n':
- (void) putc (*cp, ce -> ce_fp);
- + if (digested) {
- + if (*cp == '\n')
- + MD5Update (&mdContext, (unsigned char *) "\r\n",2);
- + else
- + MD5Update (&mdContext, (unsigned char *) cp, 1);
- + }
- if (ferror (ce -> ce_fp)) {
- content_error (ce -> ce_file, ct, "error writing to");
- goto clean_up;
- ***************
- *** 4093,4098 ****
- --- 4345,4363 ----
- goto clean_up;
- }
-
- + if (digested) {
- + unsigned char digest[16];
- +
- + MD5Final (digest, &mdContext);
- + if (bcmp ((char *) digest, (char *) ct -> c_digest,
- + sizeof digest / sizeof digest[0]))
- + content_error (NULLCP, ct,
- + "content integrity suspect (digest mismatch) -- continuing");
- + else
- + if (debugsw)
- + fprintf (stderr, "content integrity confirmed\n");
- + }
- +
- ready_to_go: ;
- (void) fseek (ce -> ce_fp, 0L, 0);
- *file = ce -> ce_file;
- ***************
- *** 4206,4213 ****
-
- /* External */
-
- ! static int openExternal (ct, ce, file, fd)
- register CT ct;
- struct cefile *ce;
- char **file;
- int *fd;
- --- 4471,4479 ----
-
- /* External */
-
- ! static int openExternal (ct, cb, ce, file, fd)
- register CT ct;
- + CT cb;
- struct cefile *ce;
- char **file;
- int *fd;
- ***************
- *** 4232,4242 ****
- }
-
- if (xpid) {
- (void) pidcheck (pidwait (xpid, NOTOK));
- xpid = 0;
- }
-
- ! if (cache && (id = ct -> c_id)) {
- char buffer[BUFSIZ];
-
- (void) sprintf (buffer, "%s/%s", cache, id = trimcpy (id));
- --- 4498,4510 ----
- }
-
- if (xpid) {
- + if (xpid < 0)
- + xpid = -xpid;
- (void) pidcheck (pidwait (xpid, NOTOK));
- xpid = 0;
- }
-
- ! if (cache && (id = cb -> c_id)) {
- char buffer[BUFSIZ];
-
- (void) sprintf (buffer, "%s/%s", cache, id = trimcpy (id));
- ***************
- *** 4244,4257 ****
-
- id = getcpy (buffer);
- if (ce -> ce_fp = fopen (id, "r")) {
- struct stat st;
-
- (void) fstat (fileno (ce -> ce_fp), &st);
- ! (void) sprintf (buffer,
- ! "Use cached copy %s of size %lu octets (content %s)? ",
- ! id, (unsigned long) st.st_size,
- ! ct -> c_partno);
- if (getanswer (buffer)) {
- ce -> ce_unlink = 0;
- ce -> ce_file = id;
- goto ready_already;
- --- 4512,4535 ----
-
- id = getcpy (buffer);
- if (ce -> ce_fp = fopen (id, "r")) {
- + char *bp;
- struct stat st;
-
- + if (cachesw == CACHE_ALWAYS)
- + goto do_cache;
- +
- (void) fstat (fileno (ce -> ce_fp), &st);
- ! (void) sprintf (bp = buffer,
- ! "Use cached copy %s of size %lu octets",
- ! id, (unsigned long) st.st_size);
- ! bp += strlen (bp);
- ! if (ct -> c_partno) {
- ! (void) sprintf (bp, " (content %s)", ct -> c_partno);
- ! bp += strlen (bp);
- ! }
- ! (void) sprintf (bp, "? ");
- if (getanswer (buffer)) {
- + do_cache: ;
- ce -> ce_unlink = 0;
- ce -> ce_file = id;
- goto ready_already;
- ***************
- *** 4276,4282 ****
- register struct exbody *e = (struct exbody *) ct -> c_ctextern;
- register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
-
- ! switch (openExternal (e -> eb_parent, ce, file, &fd)) {
- case NOTOK:
- return NOTOK;
-
- --- 4554,4560 ----
- register struct exbody *e = (struct exbody *) ct -> c_ctextern;
- register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
-
- ! switch (openExternal (e -> eb_parent, e -> eb_content, ce, file, &fd)) {
- case NOTOK:
- return NOTOK;
-
- ***************
- *** 4300,4306 ****
- }
-
- if (cache
- ! && (id = e -> eb_parent -> c_id)
- && (!e -> eb_permission
- || !uleq (e -> eb_permission, "read-write"))) {
- char buffer[BUFSIZ];
- --- 4578,4584 ----
- }
-
- if (cache
- ! && (id = e -> eb_content -> c_id)
- && (!e -> eb_permission
- || !uleq (e -> eb_permission, "read-write"))) {
- char buffer[BUFSIZ];
- ***************
- *** 4307,4313 ****
-
- (void) sprintf (buffer, "Make cached, publically-accessible copy of %s? ",
- e -> eb_name);
- ! if (getanswer (buffer)) {
- int mask;
- char cachefile[BUFSIZ];
- FILE *fp;
- --- 4585,4591 ----
-
- (void) sprintf (buffer, "Make cached, publically-accessible copy of %s? ",
- e -> eb_name);
- ! if (cachesw == CACHE_ALWAYS || getanswer (buffer)) {
- int mask;
- char cachefile[BUFSIZ];
- FILE *fp;
- ***************
- *** 4317,4328 ****
-
- mask = umask (0022);
- if (fp = fopen (cachefile, "w")) {
- register FILE *gp = ce -> ce_fp;
-
- (void) fseek (gp, 0L, 0);
-
- ! while (fgets (buffer, sizeof buffer - 1, gp))
- ! (void) fputs (buffer, fp);
- (void) fflush (fp);
-
- if (ferror (gp)) {
- --- 4595,4608 ----
-
- mask = umask (0022);
- if (fp = fopen (cachefile, "w")) {
- + int cc;
- register FILE *gp = ce -> ce_fp;
-
- (void) fseek (gp, 0L, 0);
-
- ! while ((cc = fread (buffer, sizeof *buffer, sizeof buffer,
- ! gp)) > 0)
- ! (void) fwrite (buffer, sizeof *buffer, cc, fp);
- (void) fflush (fp);
-
- if (ferror (gp)) {
- ***************
- *** 4371,4377 ****
- if (!ftp)
- return NOTOK;
- #endif
- ! switch (openExternal (e -> eb_parent, ce, file, &fd)) {
- case NOTOK:
- return NOTOK;
-
- --- 4651,4657 ----
- if (!ftp)
- return NOTOK;
- #endif
- ! switch (openExternal (e -> eb_parent, e -> eb_content, ce, file, &fd)) {
- case NOTOK:
- return NOTOK;
-
- ***************
- *** 4409,4419 ****
-
- ce -> ce_unlink = *file == NULL, caching = 0, cachefile[0] = 0;
- if (cache
- ! && (id = e -> eb_parent -> c_id)
- && (!e -> eb_permission
- || !uleq (e -> eb_permission, "read-write"))) {
- (void) sprintf (buffer, "Make cached, publically-accessible copy? ");
- ! if (getanswer (buffer)) {
- (void) sprintf (cachefile, "%s/%s", cache, id = trimcpy (id));
- free (id);
-
- --- 4689,4699 ----
-
- ce -> ce_unlink = *file == NULL, caching = 0, cachefile[0] = 0;
- if (cache
- ! && (id = e -> eb_content -> c_id)
- && (!e -> eb_permission
- || !uleq (e -> eb_permission, "read-write"))) {
- (void) sprintf (buffer, "Make cached, publically-accessible copy? ");
- ! if (cachesw == CACHE_ALWAYS || getanswer (buffer)) {
- (void) sprintf (cachefile, "%s/%s", cache, id = trimcpy (id));
- free (id);
-
- ***************
- *** 4549,4555 ****
- register struct exbody *e = (struct exbody *) ct -> c_ctextern;
- register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
-
- ! switch (openExternal (e -> eb_parent, ce, file, &fd)) {
- case NOTOK:
- return NOTOK;
-
- --- 4829,4835 ----
- register struct exbody *e = (struct exbody *) ct -> c_ctextern;
- register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
-
- ! switch (openExternal (e -> eb_parent, e -> eb_content, ce, file, &fd)) {
- case NOTOK:
- return NOTOK;
-
- ***************
- *** 4566,4572 ****
- }
-
- bp = concat ("Retrieve content ", e -> eb_partno, " by asking mailbox ",
- ! e -> eb_server, "\n\n", e -> eb_body, "\n? ", NULLCP);
- result = getanswer (bp);
- free (bp);
-
- --- 4846,4854 ----
- }
-
- bp = concat ("Retrieve content ", e -> eb_partno, " by asking mailbox ",
- ! e -> eb_server, "\n\n",
- ! e -> eb_subject ? e -> eb_subject: e -> eb_body, "\n? ",
- ! NULLCP);
- result = getanswer (bp);
- free (bp);
-
- ***************
- *** 4577,4594 ****
- vec[vecp++] = r1bindex (mailproc, '/');
- vec[vecp++] = e -> eb_server;
- vec[vecp++] = "-subject";
- ! if (cache
- ! && (id = e -> eb_parent -> c_id)
- ! && (!e -> eb_permission
- ! || !uleq (e -> eb_permission, "read-write"))) {
- ! (void) sprintf (buffer, "cache content as %s/%s", cache,
- ! id = trimcpy (id));
- ! free (id);
- !
- ! vec[vecp++] = buffer;
- ! }
- ! else
- vec[vecp++] = "mail-server request";
- vec[vecp++] = "-body";
- vec[vecp++] = e -> eb_body;
- vec[vecp] = NULL;
- --- 4859,4879 ----
- vec[vecp++] = r1bindex (mailproc, '/');
- vec[vecp++] = e -> eb_server;
- vec[vecp++] = "-subject";
- ! if (e -> eb_subject)
- vec[vecp++] = "mail-server request";
- + else
- + if (cache
- + && (id = e -> eb_content -> c_id)
- + && (!e -> eb_permission
- + || !uleq (e -> eb_permission, "read-write"))) {
- + (void) sprintf (buffer, "cache content as %s/%s", cache,
- + id = trimcpy (id));
- + free (id);
- +
- + vec[vecp++] = buffer;
- + }
- + else
- + vec[vecp++] = "mail-server request";
- vec[vecp++] = "-body";
- vec[vecp++] = e -> eb_body;
- vec[vecp] = NULL;
- ***************
- *** 5056,5062 ****
- }
-
- (void) sprintf (msgid, msgfmt, ++partno);
- ! ct -> c_id = getcpy (msgid);
-
- return OK;
- }
- --- 5341,5347 ----
- }
-
- (void) sprintf (msgid, msgfmt, ++partno);
- ! p -> c_id = getcpy (msgid);
-
- return OK;
- }
- ***************
- *** 5223,5228 ****
- --- 5508,5548 ----
-
- /* */
-
- + static char ebcdicsafe[0x100] = {
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- + 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- + 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
- + 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- + 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
- + };
- +
- static int compose_content (ct)
- register CT ct;
- {
- ***************
- *** 5422,5428 ****
- switch (ct -> c_type) {
- case CT_TEXT:
- charset = ct -> c_ctparams ? 0 : -1;
- ! linelen = 0;
- break;
-
- case CT_APPLICATION:
- --- 5742,5748 ----
- switch (ct -> c_type) {
- case CT_TEXT:
- charset = ct -> c_ctparams ? 0 : -1;
- ! linelen = ct -> c_subtype == TEXT_PLAIN ? 0 : -1;
- break;
-
- case CT_APPLICATION:
- ***************
- *** 5435,5445 ****
- }
- while (fgets (buffer, sizeof buffer - 1, in)) {
- if (charset == -1) {
- ! for (cp = buffer; *cp; cp++)
- if (!isascii (*cp)) {
- charset = CHARSET_UNKNOWN;
- break;
- }
- if ((linelen == -1) && (cp - buffer > CPERLIN + 1))
- linelen = 1;
- if (result == NOTOK)
- --- 5755,5770 ----
- }
- while (fgets (buffer, sizeof buffer - 1, in)) {
- if (charset == -1) {
- ! for (cp = buffer; *cp; cp++) {
- if (!isascii (*cp)) {
- charset = CHARSET_UNKNOWN;
- break;
- }
- + if (linelen == -1
- + && ebcdicsw
- + && !ebcdicsafe[*cp & 0xff])
- + linelen = 1;
- + }
- if ((linelen == -1) && (cp - buffer > CPERLIN + 1))
- linelen = 1;
- if (result == NOTOK)
- ***************
- *** 5451,5456 ****
- --- 5776,5786 ----
- if (result == NOTOK)
- continue;
-
- + if (linelen == -1
- + && (cp = buffer + strlen (buffer) - 2) > buffer
- + && isspace (*cp))
- + linelen = 1;
- +
- if (buffer[0] == '-' && buffer[1] == '-') {
- for (cp = buffer + strlen (buffer) - 1;
- cp >= buffer;
- ***************
- *** 5507,5512 ****
- --- 5837,5844 ----
- *cp++ = '\0';
- *ep = cp;
- }
- + if (ct -> c_type == CT_TEXT && ct -> c_subtype != TEXT_PLAIN)
- + ct -> c_encoding = linelen == -1 ? CE_7BIT : CE_QUOTED;
-
- (void) fclose (in);
-
- ***************
- *** 5620,5635 ****
- break;
-
- case CT_TEXT:
- ! if (ct -> c_subtype != TEXT_PLAIN
- ! || (ct -> c_ctparams
- && ((struct text *) ct -> c_ctparams) -> tx_charset
- ! != CHARSET_USASCII)) {
- quoted_printable: ;
- fprintf (out, "%s: %s\n\n", ENCODING_FIELD,
- "quoted-printable");
- (void) writeQuoted (ct, out);
- break;
- }
- /* else fall... */
-
- case CT_MESSAGE:
- --- 5952,5972 ----
- break;
-
- case CT_TEXT:
- ! if (ct -> c_ctparams
- && ((struct text *) ct -> c_ctparams) -> tx_charset
- ! != CHARSET_USASCII) {
- quoted_printable: ;
- + if (checksw)
- + writeDigest (ct, out, 1);
- fprintf (out, "%s: %s\n\n", ENCODING_FIELD,
- "quoted-printable");
- (void) writeQuoted (ct, out);
- break;
- }
- + if (ct -> c_subtype != TEXT_PLAIN && ct -> c_encoding != CE_7BIT)
- + goto quoted_printable;
- + if (checksw)
- + goto quoted_printable;
- /* else fall... */
-
- case CT_MESSAGE:
- ***************
- *** 5656,5661 ****
- --- 5993,6000 ----
- /* else fall... */
-
- default:
- + if (checksw)
- + writeDigest (ct, out, 0);
- fprintf (out, "%s: %s\n\n", ENCODING_FIELD, "base64");
- (void) writeBase64 (ct, out);
- break;
- ***************
- *** 5730,5756 ****
- n++;
- break;
-
- ! case '@':
- ! case '`':
- ! if (ebcdicsw)
- goto three_print;
- - one_print: ;
- (void) putc (*cp, out);
- n++;
- break;
-
- - default:
- - if (('!' <= *cp && *cp <= '$')
- - || ('[' <= *cp && *cp <= '^')
- - || ('{' <= *cp && *cp <= '~')) {
- - if (ebcdicsw)
- - goto three_print;
- - goto one_print;
- - }
- -
- - if ('%' <= *cp && *cp <= 'z')
- - goto one_print;
- - /* else fall... */
- case '=':
- three_print: ;
- (void) fprintf (out, "=%02X", *cp & 0xff);
- --- 6069,6081 ----
- n++;
- break;
-
- ! default:
- ! if (ebcdicsw && !ebcdicsafe[*cp & 0xff])
- goto three_print;
- (void) putc (*cp, out);
- n++;
- break;
-
- case '=':
- three_print: ;
- (void) fprintf (out, "=%02X", *cp & 0xff);
- ***************
- *** 5776,5782 ****
-
- /* */
-
- ! static char nib2b64[0x40f] =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-
-
- --- 6101,6107 ----
-
- /* */
-
- ! static char nib2b64[0x40+1] =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-
-
- ***************
- *** 5847,5852 ****
- --- 6172,6337 ----
- return OK;
- }
-
- + /* */
- +
- + static int writeDigest (ct, out, asciiP)
- + register CT ct;
- + FILE *out;
- + int asciiP;
- + {
- + int cc;
- + char buffer[BUFSIZ];
- + register unsigned char *dp;
- + unsigned char digest[16];
- + FILE *in;
- + MD5_CTX mdContext;
- +
- + if ((in = fopen (ct -> c_file, "r")) == NULL)
- + adios (ct -> c_file, "unable to open for reading");
- +
- + MD5Init (&mdContext);
- + if (asciiP) {
- + while (fgets (buffer, sizeof buffer - 1, in)) {
- + register char *cp;
- + char c;
- +
- + cp = buffer + strlen (buffer) - 1;
- + if ((c = *cp) == '\n')
- + *cp = '\0';
- +
- + MD5Update (&mdContext, (unsigned char *) buffer,
- + (unsigned int) strlen (buffer));
- +
- + if (c == '\n')
- + MD5Update (&mdContext, (unsigned char *) "\r\n", 2);
- + }
- + }
- + else
- + while ((cc = fread (buffer, sizeof *buffer, sizeof buffer, in)) > 0)
- + MD5Update (&mdContext, (unsigned char *) buffer,
- + (unsigned int) cc);
- + MD5Final (digest, &mdContext);
- + if (debugsw) {
- + unsigned char *ep;
- +
- + fprintf (stderr, "MD5 digest=");
- + for (ep = (dp = digest) + sizeof digest / sizeof digest[0];
- + dp < ep;
- + dp++)
- + fprintf (stderr, "%02x", *dp & 0xff);
- + fprintf (stderr, "\n");
- + }
- +
- + (void) fclose (in);
- +
- + fprintf (out, "%s: ", MD5_FIELD);
- + for (dp = digest, cc = sizeof digest / sizeof digest[0]; cc > 0; cc -= 3) {
- + unsigned long bits;
- + register char *bp;
- + char outbuf[4];
- +
- + bits = (*dp++ & 0xff) << 16;
- + if (cc > 1) {
- + bits |= (*dp++ & 0xff) << 8;
- + if (cc > 2)
- + bits |= *dp++ & 0xff;
- + }
- +
- + for (bp = outbuf + sizeof outbuf; bp > outbuf; bits >>= 6)
- + *--bp = nib2b64[bits & 0x3f];
- + if (cc < 3) {
- + outbuf[3] = '=';
- + if (cc < 2)
- + outbuf[2] = '=';
- + }
- +
- + (void) fwrite (outbuf, sizeof *outbuf, sizeof outbuf, out);
- + }
- + fprintf (out, "\n");
- + }
- +
- + /* */
- +
- + static int readDigest (ct, cp)
- + register CT ct;
- + register char *cp;
- + {
- + int bitno,
- + skip;
- + unsigned long bits;
- + char *bp = cp;
- + register unsigned char *dp;
- + unsigned char value,
- + *ep,
- + *b = (unsigned char *) &bits,
- + *b1 = &b[endian > 0 ? 1 : 2],
- + *b2 = &b[endian > 0 ? 2 : 1],
- + *b3 = &b[endian > 0 ? 3 : 0];
- +
- + bitno = 18, bits = 0L, skip = 0;
- + for (ep = (dp = ct -> c_digest)
- + + sizeof ct -> c_digest / sizeof ct -> c_digest[0];
- + *cp;
- + cp++)
- + switch (*cp) {
- + default:
- + if (skip
- + || (*cp & 0x80)
- + || (value = b642nib[*cp & 0x7f]) > 0x3f) {
- + if (debugsw)
- + fprintf (stderr, "invalid BASE64 encoding\n");
- + return NOTOK;
- + }
- +
- + bits |= value << bitno;
- + test_end: ;
- + if ((bitno -= 6) < 0) {
- + if (dp + (3 - skip) > ep)
- + goto invalid_digest;
- + *dp++ = *b1;
- + if (skip < 2) {
- + *dp++ = *b2;
- + if (skip < 1)
- + *dp++ = *b3;
- + }
- + bitno = 18, bits = 0L, skip = 0;
- + }
- + break;
- +
- + case '=':
- + if (++skip > 3)
- + goto self_delimiting;
- + goto test_end;
- + }
- + if (bitno != 18) {
- + if (debugsw)
- + fprintf (stderr, "premature ending (bitno %d)\n", bitno);
- +
- + return NOTOK;
- + }
- + self_delimiting: ;
- + if (dp != ep) {
- + invalid_digest: ;
- + if (debugsw) {
- + while (*cp)
- + cp++;
- + fprintf (stderr, "invalid MD5 digest (got %d octets)\n",
- + cp - bp);
- + }
- +
- + return NOTOK;
- + }
- +
- + if (debugsw) {
- + fprintf (stderr, "MD5 digest=");
- + for (dp = ct -> c_digest; dp < ep; dp++)
- + fprintf (stderr, "%02x", *dp & 0xff);
- + fprintf (stderr, "\n");
- + }
- +
- + return OK;
- + }
- +
- /* VIAMAIL */
-
- #include "../zotnet/tws.h"
- ***************
- *** 5865,5870 ****
- --- 6350,6356 ----
- nparts,
- status;
- long pos;
- + long offset;
- char tmpfil[BUFSIZ];
- struct stat st;
- FILE *fp;
- ***************
- *** 5888,5893 ****
- --- 6374,6380 ----
- fprintf (fp, "From: %s\n", fromsw), nlines++;
- }
- fprintf (fp, "%s: %s\n", VRSN_FIELD, VRSN_VALUE), nlines++;
- + offset = ftell (fp);
- fprintf (fp, "%s: application/octet-stream", TYPE_FIELD);
- if (parmsw)
- fprintf (fp, "; %s", parmsw);
- ***************
- *** 5910,5922 ****
- nparts = (nlines + (LPERMSG - 1)) / LPERMSG;
-
- if (nparts <= 1)
- ! status = via_post (tmpfil);
- else {
- int partno;
- long clock;
- char buffer[BUFSIZ],
- msgid[BUFSIZ];
- !
- if (verbosw) {
- printf ("sending binary image as %d partial messages\n", nparts);
- (void) fflush (stdout);
- --- 6397,6409 ----
- nparts = (nlines + (LPERMSG - 1)) / LPERMSG;
-
- if (nparts <= 1)
- ! status = via_post (tmpfil, 0);
- else {
- int partno;
- long clock;
- char buffer[BUFSIZ],
- msgid[BUFSIZ];
- !
- if (verbosw) {
- printf ("sending binary image as %d partial messages\n", nparts);
- (void) fflush (stdout);
- ***************
- *** 5925,5935 ****
- (void) time (&clock);
- (void) sprintf (msgid, "<%d.%ld@%s>", getpid (), clock, LocalName ());
-
- ! (void) fseek (fp, 0L, 0);
- ! if (!fgets (buffer, sizeof buffer, fp)
- ! || !fgets (buffer, sizeof buffer, fp)
- ! || (subjsw && !fgets (buffer, sizeof buffer, fp)))
- ! adios (NULLCP, "premature eof");
- for (partno = 1; partno <= nparts; partno++) {
- int lineno;
- char tmpdrf[BUFSIZ];
- --- 6412,6418 ----
- (void) time (&clock);
- (void) sprintf (msgid, "<%d.%ld@%s>", getpid (), clock, LocalName ());
-
- ! (void) fseek (fp, offset, 0);
- for (partno = 1; partno <= nparts; partno++) {
- int lineno;
- char tmpdrf[BUFSIZ];
- ***************
- *** 5962,5967 ****
- --- 6445,6451 ----
-
- (void) fputs (buffer, out);
- }
- + offset = ftell (fp);
-
- if (fflush (out))
- adios (tmpdrf, "error writing to");
- ***************
- *** 5968,5987 ****
-
- (void) fclose (out);
-
- ! if (slowsw > 0 && 1 < partno && partno < nparts) {
- if (verbosw) {
- printf ("pausing %d seconds before sending part %d...\n",
- ! slowsw, partno);
- (void) fflush (stdout);
- }
-
- sleep ((unsigned) slowsw);
- }
- -
- - status = via_post (tmpdrf);
- - (void) unlink (tmpdrf);
- - if (status)
- - break;
- }
- }
-
- --- 6452,6471 ----
-
- (void) fclose (out);
-
- ! status = via_post (tmpdrf, slowsw == 0);
- ! (void) unlink (tmpdrf);
- ! if (status)
- ! break;
- !
- ! if (slowsw > 0 && partno < nparts) {
- if (verbosw) {
- printf ("pausing %d seconds before sending part %d...\n",
- ! slowsw, partno + 1);
- (void) fflush (stdout);
- }
-
- sleep ((unsigned) slowsw);
- }
- }
- }
-
- ***************
- *** 5993,6000 ****
-
- /* */
-
- ! static int via_post (file)
- char *file;
- {
- int child_id,
- i;
- --- 6477,6485 ----
-
- /* */
-
- ! static int via_post (file, queued)
- char *file;
- + int queued;
- {
- int child_id,
- i;
- ***************
- *** 6007,6013 ****
- /* NOTREACHED */
-
- case OK:
- ! (void) execlp (postproc, r1bindex (postproc, '/'), file, NULLCP);
- fprintf (stderr, "unable to exec ");
- perror (postproc);
- _exit (-1);
- --- 6492,6499 ----
- /* NOTREACHED */
-
- case OK:
- ! (void) execlp (postproc, r1bindex (postproc, '/'), file,
- ! queued ? "-queued" : NULLCP, NULLCP);
- fprintf (stderr, "unable to exec ");
- perror (postproc);
- _exit (-1);
- *** ../mh-6.8/uip/msgchk.c Tue Dec 15 08:56:00 1992
- --- uip/msgchk.c Fri Aug 20 08:52:59 1993
- ***************
- *** 1,6 ****
- /* msgchk.c - check for mail */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: msgchk.c,v 1.11 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* msgchk.c - check for mail */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: msgchk.c,v 1.12 1993/08/20 15:52:41 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- ***************
- *** 392,402 ****
- status;
- char *pass;
-
- ! if (rpop) {
- ! if (user == NULL)
- ! user = getusr ();
- pass = getusr ();
- - }
- else
- ruserpass (host, &user, &pass);
-
- --- 392,401 ----
- status;
- char *pass;
-
- ! if (user == NULL)
- ! user = getusr ();
- ! if (rpop > 0)
- pass = getusr ();
- else
- ruserpass (host, &user, &pass);
-
- *** ../mh-6.8/uip/post.c Tue Dec 15 08:56:03 1992
- --- uip/post.c Fri Aug 20 08:53:39 1993
- ***************
- *** 1,6 ****
- /* post.c - enter messages into the transport system */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: post.c,v 2.21 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* post.c - enter messages into the transport system */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: post.c,v 2.22 1993/08/20 15:53:20 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- ***************
- *** 149,154 ****
- --- 149,157 ----
- #define PARTSW 34
- "partno", -6,
-
- + #define QUEUESW 35
- + "queued", -6,
- +
- NULL, 0
- };
-
- ***************
- *** 327,332 ****
- --- 330,337 ----
- static char *fill_in = NULLCP;
- static char *partno = NULLCP;
-
- + static int queued = 0;
- +
- long lseek (), time ();
-
- static putfmt(), start_headers(), finish_headers(), putgrp(), pl();
- ***************
- *** 565,570 ****
- --- 570,579 ----
- if (!(partno = *argp++) || *partno == '-')
- adios (NULLCP, "missing argument to %s", argp[-2]);
- continue;
- +
- + case QUEUESW:
- + queued++;
- + continue;
- }
- if (msg)
- adios (NULLCP, "only one message at a time!");
- ***************
- *** 1403,1409 ****
- #endif /* MMDFMTS */
- #ifdef SENDMTS
- if (!whomsw || checksw)
- ! if (rp_isbad (retval = sm_init (clientsw, serversw, 0, 0, snoop))
- || rp_isbad (retval = sm_winit (smtpmode, from)))
- die (NULLCP, "problem initializing server; %s",
- rp_string (retval));
- --- 1412,1418 ----
- #endif /* MMDFMTS */
- #ifdef SENDMTS
- if (!whomsw || checksw)
- ! if (rp_isbad (retval = sm_init (clientsw, serversw, 0, 0, snoop, 0, 0))
- || rp_isbad (retval = sm_winit (smtpmode, from)))
- die (NULLCP, "problem initializing server; %s",
- rp_string (retval));
- ***************
- *** 1476,1482 ****
- int bccque,
- talk;
- {
- ! int fd;
- #ifndef MHMTS
- int retval;
- #ifdef MMDFMTS
- --- 1485,1492 ----
- int bccque,
- talk;
- {
- ! int fd,
- ! onex = !(msgflags & MINV) || bccque;
- #ifndef MHMTS
- int retval;
- #ifdef MMDFMTS
- ***************
- *** 1511,1517 ****
- #endif /* RP_NS */
- #endif /* MMDFMTS */
- #ifdef SENDMTS
- ! if (rp_isbad (retval = sm_init (clientsw, serversw, watch, verbose, snoop))
- || rp_isbad (retval = sm_winit (smtpmode, from)))
- die (NULLCP, "problem initializing server; %s", rp_string (retval));
- #endif /* SENDMTS */
- --- 1521,1528 ----
- #endif /* RP_NS */
- #endif /* MMDFMTS */
- #ifdef SENDMTS
- ! if (rp_isbad (retval = sm_init (clientsw, serversw, watch, verbose, snoop,
- ! onex, queued))
- || rp_isbad (retval = sm_winit (smtpmode, from)))
- die (NULLCP, "problem initializing server; %s", rp_string (retval));
- #endif /* SENDMTS */
- ***************
- *** 1541,1547 ****
- (void) mm_end (OK);
- #endif /* MMDFMTS */
- #ifdef SENDMTS
- ! (void) sm_end (!(msgflags & MINV) || bccque ? OK : DONE);
- #endif /* SENDMTS */
-
- sigoff ();
- --- 1552,1558 ----
- (void) mm_end (OK);
- #endif /* MMDFMTS */
- #ifdef SENDMTS
- ! (void) sm_end (onex ? OK : DONE);
- #endif /* SENDMTS */
-
- sigoff ();
- ***************
- *** 1667,1673 ****
- #endif /* RP_NS */
- #endif /* MMDFMTS */
- #ifdef SENDMTS
- ! if (rp_isbad (retval = sm_init (clientsw, serversw, watch, verbose, snoop))
- || rp_isbad (retval = sm_winit (smtpmode, from)))
- die (NULLCP, "problem initializing server; %s", rp_string (retval));
- #endif /* SENDMTS */
- --- 1678,1685 ----
- #endif /* RP_NS */
- #endif /* MMDFMTS */
- #ifdef SENDMTS
- ! if (rp_isbad (retval = sm_init (clientsw, serversw, watch, verbose, snoop,
- ! 0, 0))
- || rp_isbad (retval = sm_winit (smtpmode, from)))
- die (NULLCP, "problem initializing server; %s", rp_string (retval));
- #endif /* SENDMTS */
- *** ../mh-6.8/uip/replsbr.c Tue Dec 15 08:56:04 1992
- --- uip/replsbr.c Fri Feb 26 13:59:31 1993
- ***************
- *** 1,6 ****
- /* replsbr.c - routines to help repl along... */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: replsbr.c,v 1.13 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* replsbr.c - routines to help repl along... */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: replsbr.c,v 1.14 1993/02/26 21:59:28 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- ***************
- *** 422,427 ****
- --- 422,431 ----
- (void) dup2 (fileno (out), fileno (stdout));
- closefds (3);
-
- + #ifdef _FSTDIO
- + /* <sigh> the code assumed that rewind does this. */
- + lseek (fileno(stdin), 0, SEEK_SET);
- + #endif
- execlp (mhlproc, mhl, "-form", filter, "-noclear", NULLCP);
- fprintf (stderr, "unable to exec ");
- perror (mhlproc);
- *** ../mh-6.8/uip/sbboards.c Tue Dec 15 08:56:05 1992
- --- uip/sbboards.c Fri Aug 20 08:53:59 1993
- ***************
- *** 4,10 ****
- /* spop.c - MH style mailer to write to a POP subscriber */
- #endif SPOP
- #ifndef lint
- ! static char ident[] = "@(#)$Id: sbboards.c,v 1.6 1992/11/24 21:00:41 jromine Exp $";
- #endif lint
-
- #ifndef SPOP
- --- 4,10 ----
- /* spop.c - MH style mailer to write to a POP subscriber */
- #endif SPOP
- #ifndef lint
- ! static char ident[] = "@(#)$Id: sbboards.c,v 1.8 1993/08/20 15:53:49 jromine Exp $";
- #endif lint
-
- #ifndef SPOP
- ***************
- *** 109,114 ****
- --- 109,123 ----
- #endif /* SYS5 */
- #endif
-
- + #ifndef SPOP
- + static int mbx_init();
- + #endif
- + #ifdef DISTRIBUTE
- + static int distribute(), notify(), encap(),
- + dst_init(), dst_text(),
- + dst_end(), dst_lose(), dst_adrs();
- + #endif
- +
- /* hack */
- #define adios my_adios
- static localmail(), arginit();
- ***************
- *** 248,254 ****
- {
- int retval;
-
- ! if (rp_isbad (retval = sm_init (NULLCP, NULLCP, 0, 0, 0))
- || rp_isbad (retval = sm_winit (S_MAIL, bb_from)))
- return lose ("problem initializing SendMail; %s",
- rp_string (retval));
- --- 257,263 ----
- {
- int retval;
-
- ! if (rp_isbad (retval = sm_init (NULLCP, NULLCP, 0, 0, 0, 0, 0))
- || rp_isbad (retval = sm_winit (S_MAIL, bb_from)))
- return lose ("problem initializing SendMail; %s",
- rp_string (retval));
- ***************
- *** 380,386 ****
- if (bb_fderr == NOTOK)
- return;
-
- ! if (rp_isbad (sm_init (NULLCP, NULLCP, 0, 0, 0))
- || rp_isbad (sm_winit (S_MAIL, bb_from)))
- goto sm_err;
-
- --- 389,395 ----
- if (bb_fderr == NOTOK)
- return;
-
- ! if (rp_isbad (sm_init (NULLCP, NULLCP, 0, 0, 0, 0, 0))
- || rp_isbad (sm_winit (S_MAIL, bb_from)))
- goto sm_err;
-
- *** ../mh-6.8/uip/scansbr.c Tue Dec 15 08:56:05 1992
- --- uip/scansbr.c Fri Aug 20 08:54:16 1993
- ***************
- *** 1,6 ****
- /* scansbr.c - routines to help scan along... */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: scansbr.c,v 1.13 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* scansbr.c - routines to help scan along... */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: scansbr.c,v 1.15 1993/08/20 15:54:08 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- ***************
- *** 13,18 ****
- --- 13,22 ----
- #include <sys/types.h>
- #include <sys/stat.h>
-
- + #ifdef _FSTDIO
- + #define _ptr _p /* Gag */
- + #define _cnt _w /* Wretch */
- + #endif
-
- #define MAXSCANL 256 /* longest possible scan line */
- #define SBUFSIZ 512 /* buffer size for content part of header
- ***************
- *** 81,90 ****
- char *scnmsg;
- FILE *scnout;
- char name[NAMESZ];
- ! static int slwidth;
-
- /* first-time only initialization */
- if (scanl == NULLCP) {
- if (width == 0) {
- if ((width = sc_width ()) < WIDTH/2)
- width = WIDTH/2;
- --- 85,97 ----
- char *scnmsg;
- FILE *scnout;
- char name[NAMESZ];
- ! static int rlwidth,
- ! slwidth;
-
- /* first-time only initialization */
- if (scanl == NULLCP) {
- + int bigwid;
- +
- if (width == 0) {
- if ((width = sc_width ()) < WIDTH/2)
- width = WIDTH/2;
- ***************
- *** 126,133 ****
- if (used_buf == NULL)
- adios (NULLCP, "unable to allocate component buffer stack");
- used_buf += ncomps+1; *--used_buf = 0;
- for (i = ncomps; i--; )
- ! if ((*nxtbuf++ = malloc( SBUFSIZ )) == NULL)
- adios (NULLCP, "unable to allocate component buffer");
- }
- /* each-message initialization */
- --- 133,141 ----
- if (used_buf == NULL)
- adios (NULLCP, "unable to allocate component buffer stack");
- used_buf += ncomps+1; *--used_buf = 0;
- + rlwidth = bodycomp && (width > SBUFSIZ) ? width : SBUFSIZ;
- for (i = ncomps; i--; )
- ! if ((*nxtbuf++ = malloc( rlwidth )) == NULL)
- adios (NULLCP, "unable to allocate component buffer");
- }
- /* each-message initialization */
- ***************
- *** 142,148 ****
- * get the first field. If the msg is non-empty and we're doing
- * an "inc", open the output file.
- */
- ! if ((state = m_getfld (FLD, name, tmpbuf, SBUFSIZ, inb)) == FILEEOF)
- if (ferror(inb)) {
- advise("read", "unable to"); /* "read error" */
- return SCNFAT;
- --- 150,156 ----
- * get the first field. If the msg is non-empty and we're doing
- * an "inc", open the output file.
- */
- ! if ((state = m_getfld (FLD, name, tmpbuf, rlwidth, inb)) == FILEEOF)
- if (ferror(inb)) {
- advise("read", "unable to"); /* "read error" */
- return SCNFAT;
- ***************
- *** 168,174 ****
- }
-
- /* scan - main loop */
- ! for (compnum = 1; ; state = m_getfld (state, name, tmpbuf, SBUFSIZ, inb)) {
- switch (state) {
- case FLD:
- case FLDPLUS:
- --- 176,182 ----
- }
-
- /* scan - main loop */
- ! for (compnum = 1; ; state = m_getfld (state, name, tmpbuf, rlwidth, inb)) {
- switch (state) {
- case FLD:
- case FLDPLUS:
- ***************
- *** 203,209 ****
- } while (cptr = cptr->c_next);
-
- while (state == FLDPLUS) {
- ! state = m_getfld (state, name, tmpbuf, SBUFSIZ, inb);
- if (outnum)
- FPUTS (tmpbuf);
- }
- --- 211,217 ----
- } while (cptr = cptr->c_next);
-
- while (state == FLDPLUS) {
- ! state = m_getfld (state, name, tmpbuf, rlwidth, inb);
- if (outnum)
- FPUTS (tmpbuf);
- }
- *** ../mh-6.8/uip/sendsbr.c Tue Dec 15 08:56:06 1992
- --- uip/sendsbr.c Fri Aug 20 08:55:15 1993
- ***************
- *** 1,6 ****
- /* sendsbr.c - routines to help WhatNow/Send along */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: sendsbr.c,v 2.12 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* sendsbr.c - routines to help WhatNow/Send along */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: sendsbr.c,v 2.13 1993/08/20 15:54:44 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- ***************
- *** 99,112 ****
- || distfile
- || stat (drft, &sts) == NOTOK
- || sts.st_size < CPERMSG) {
- splitsw = -1;
- return sendaux2 (vec, vecp, drft, st);
- }
- - status = OK;
-
- - vec[vecp++] = "-partno";
- - vec[vecp++] = partnum;
- -
- if ((in = fopen (drft, "r")) == NULL)
- adios (drft, "unable to open for reading");
-
- --- 99,109 ----
- || distfile
- || stat (drft, &sts) == NOTOK
- || sts.st_size < CPERMSG) {
- + one_shot: ;
- splitsw = -1;
- return sendaux2 (vec, vecp, drft, st);
- }
-
- if ((in = fopen (drft, "r")) == NULL)
- adios (drft, "unable to open for reading");
-
- ***************
- *** 119,125 ****
- case FLDEOF:
- compnum++;
-
- ! if (uleq (name, VRSN_FIELD) || uleq (name, "Message-ID")) {
- while (state == FLDPLUS)
- state = m_getfld (state, name, buffer, sizeof buffer,
- in);
- --- 116,124 ----
- case FLDEOF:
- compnum++;
-
- ! if (uleq (name, VRSN_FIELD)
- ! || uleq (name, "Encrypted")
- ! || uleq (name, "Message-ID")) {
- while (state == FLDPLUS)
- state = m_getfld (state, name, buffer, sizeof buffer,
- in);
- ***************
- *** 162,167 ****
- --- 161,168 ----
-
- break;
- }
- + if (cp == NULL)
- + adios (NULLCP, "headers missing from draft");
-
- nparts = 1, pos = start;
- while (fgets (buffer, sizeof buffer - 1, in)) {
- ***************
- *** 170,179 ****
- --- 171,196 ----
- if ((pos += (len = strlen (buffer))) > CPERMSG)
- nparts++, pos = len;
- }
- + if (nparts == 1) {
- + free (cp);
- + if (dp)
- + free (dp);
- +
- + (void) fclose (in);
- +
- + goto one_shot;
- + }
- +
- if (!pushsw) {
- printf ("Sending as %d Partial Messages\n", nparts);
- (void) fflush (stdout);
- }
- + status = OK;
- +
- + vec[vecp++] = "-partno";
- + vec[vecp++] = partnum;
- + if (splitsw == 0)
- + vec[vecp++] = "-queued";
-
- (void) time (&clock);
- (void) sprintf (msgid, "<%d.%ld@%s>", getpid (), clock, LocalName ());
- *** ../mh-6.8/uip/spop.c Tue Dec 15 08:56:07 1992
- --- uip/spop.c Fri Aug 20 08:55:28 1993
- ***************
- *** 4,10 ****
- /* spop.c - MH style mailer to write to a POP subscriber */
- #endif SPOP
- #ifndef lint
- ! static char ident[] = "@(#)$Id: spop.c,v 1.6 1992/11/04 01:04:35 jromine Exp $";
- #endif lint
-
- #ifndef SPOP
- --- 4,10 ----
- /* spop.c - MH style mailer to write to a POP subscriber */
- #endif SPOP
- #ifndef lint
- ! static char ident[] = "@(#)$Id: spop.c,v 1.7 1993/08/20 15:55:23 jromine Exp $";
- #endif lint
-
- #ifndef SPOP
- ***************
- *** 248,254 ****
- {
- int retval;
-
- ! if (rp_isbad (retval = sm_init (NULLCP, NULLCP, 0, 0, 0))
- || rp_isbad (retval = sm_winit (S_MAIL, bb_from)))
- return lose ("problem initializing SendMail; %s",
- rp_string (retval));
- --- 248,254 ----
- {
- int retval;
-
- ! if (rp_isbad (retval = sm_init (NULLCP, NULLCP, 0, 0, 0, 0, 0))
- || rp_isbad (retval = sm_winit (S_MAIL, bb_from)))
- return lose ("problem initializing SendMail; %s",
- rp_string (retval));
- ***************
- *** 380,386 ****
- if (bb_fderr == NOTOK)
- return;
-
- ! if (rp_isbad (sm_init (NULLCP, NULLCP, 0, 0, 0))
- || rp_isbad (sm_winit (S_MAIL, bb_from)))
- goto sm_err;
-
- --- 380,386 ----
- if (bb_fderr == NOTOK)
- return;
-
- ! if (rp_isbad (sm_init (NULLCP, NULLCP, 0, 0, 0, 0, 0))
- || rp_isbad (sm_winit (S_MAIL, bb_from)))
- goto sm_err;
-
- *** ../mh-6.8/uip/vmh.c Tue Dec 15 08:56:08 1992
- --- uip/vmh.c Fri Feb 26 14:00:35 1993
- ***************
- *** 1,6 ****
- /* vmh.c - visual front-end to mh */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: vmh.c,v 1.18 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
- #if defined(SYS5) && !defined(TERMINFO)
- /*
- --- 1,6 ----
- /* vmh.c - visual front-end to mh */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: vmh.c,v 1.19 1993/02/26 22:00:33 jromine Exp $";
- #endif /* lint */
- #if defined(SYS5) && !defined(TERMINFO)
- /*
- ***************
- *** 59,64 ****
- --- 59,75 ----
- #include <termio.h>
- #define TCGETATTR /* tcgetattr() */
- #endif
- + #ifdef BSD44
- + #define USE_OLD_TTY
- + #define _maxx maxx /* curses.h */
- + #define _maxy maxy
- + #define _curx curx /* curses.h */
- + #define _cury cury
- + void __cputchar __P((int));
- + #undef _putchar
- + #define _putchar __cputchar
- + #include <sys/ioctl.h> /* sgttyb */
- + #endif
-
- #define ALARM ((unsigned int) 10)
- #define PAUSE ((unsigned int) 2)
- ***************
- *** 161,167 ****
- #endif /* TIOCGLTC */
-
-
- ! #ifndef SYS5
- int _putchar ();
- #endif /* not SYS5 */
- #ifdef SIGTSTP
- --- 172,178 ----
- #endif /* TIOCGLTC */
-
-
- ! #if !defined(SYS5) && !defined(BSD44)
- int _putchar ();
- #endif /* not SYS5 */
- #ifdef SIGTSTP
- ***************
- *** 1122,1128 ****
- --- 1133,1143 ----
- adios (NULLCP, "unable to allocate line storage");
-
- lp -> l_no = (ltail ? ltail -> l_no : 0) + 1;
- + #ifndef BSD44
- lp -> l_buf = getcpy (w -> _y[w -> _cury]);
- + #else
- + lp -> l_buf = getcpy (w -> lines[w -> _cury]->line);
- + #endif
- for (cp = lp -> l_buf + strlen (lp -> l_buf) - 1; cp >= lp -> l_buf; cp--)
- if (isspace (*cp))
- *cp = 0;
- *** ../mh-6.8/zotnet/mts/client.c Tue Dec 15 08:56:18 1992
- --- zotnet/mts/client.c Fri Aug 20 08:55:48 1993
- ***************
- *** 1,6 ****
- /* client.c - connect to a server */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: client.c,v 1.19 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
-
- #if defined(SYS5) && defined(AUX)
- --- 1,6 ----
- /* client.c - connect to a server */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: client.c,v 1.20 1993/08/20 15:55:35 jromine Exp $";
- #endif /* lint */
-
- #if defined(SYS5) && defined(AUX)
- ***************
- *** 88,93 ****
- --- 88,105 ----
- static int rcaux (), getport (), inet ();
- #endif
-
- +
- + #if defined(BIND) && !defined(h_addr)
- + #define h_addr h_addr_list[0]
- + #endif
- +
- + #define inaddr_copy(hp,sin) \
- + bcopy ((hp) -> h_addr, (char *) &((sin) -> sin_addr), (hp) -> h_length)
- +
- +
- + struct hostent *gethostbystring ();
- +
- +
- static int brkany ();
- static char *getcpy (), **copyip (), **brkstring ();
-
- ***************
- *** 173,179 ****
- continue;
- }
-
- ! if (hp = gethostbyname (*ap)) {
- switch (sd = rcaux (sp, hp, rproto, response)) {
- case NOTOK:
- case OOPS1:
- --- 185,191 ----
- continue;
- }
-
- ! if (hp = gethostbystring (*ap)) {
- switch (sd = rcaux (sp, hp, rproto, response)) {
- case NOTOK:
- case OOPS1:
- ***************
- *** 223,230 ****
-
- bzero ((char *) isock, sizeof *isock);
- isock -> sin_family = hp -> h_addrtype;
- isock -> sin_port = sp -> s_port;
- - bcopy (hp -> h_addr, (char *) &isock -> sin_addr, hp -> h_length);
-
- if (connect (sd, (struct sockaddr *) isock, sizeof *isock) == NOTOK)
- switch (errno) {
- --- 235,242 ----
-
- bzero ((char *) isock, sizeof *isock);
- isock -> sin_family = hp -> h_addrtype;
- + inaddr_copy (hp, isock);
- isock -> sin_port = sp -> s_port;
-
- if (connect (sd, (struct sockaddr *) isock, sizeof *isock) == NOTOK)
- switch (errno) {
- ***************
- *** 339,344 ****
- --- 351,405 ----
-
- bcopy (hp -> h_addr, (char *) &in, sizeof in);
- return (inet_netof (in) == net);
- + }
- +
- + /* */
- +
- + /* taken from ISODE's compat/internet.c */
- +
- + #ifndef DG
- + u_long inet_addr ();
- + #else
- + struct in_addr inet_addr ();
- + #endif
- +
- +
- + static char *empty = NULL;
- + #ifdef h_addr
- + static char *addrs[2] = { NULL };
- + #endif
- +
- + struct hostent *gethostbystring (s)
- + char *s;
- + {
- + register struct hostent *h;
- + #ifndef DG
- + static u_long iaddr;
- + #else
- + static struct in_addr iaddr;
- + #endif
- + static struct hostent hs;
- +
- + iaddr = inet_addr (s);
- + #ifndef DG
- + if (iaddr == NOTOK && strcmp (s, "255.255.255.255"))
- + #else
- + if (iaddr.s_addr == NOTOK && strcmp (s, "255.255.255.255"))
- + #endif
- + return gethostbyname (s);
- +
- + h = &hs;
- + h -> h_name = s;
- + h -> h_aliases = ∅
- + h -> h_addrtype = AF_INET;
- + h -> h_length = sizeof (iaddr);
- + #ifdef h_addr
- + h -> h_addr_list = addrs;
- + bzero ((char *) addrs, sizeof addrs);
- + #endif
- + h -> h_addr = (char *) &iaddr;
- +
- + return h;
- }
-
- /* */
- *** ../mh-6.8/zotnet/tws/dtimep.lex Tue Dec 15 08:56:20 1992
- --- zotnet/tws/dtimep.lex Fri Feb 26 14:07:44 1993
- ***************
- *** 36,38 ****
- #ifndef lint
- ! static char ident[] = "@(#)$Id: dtimep.lex,v 2.14 1992/12/15 00:20:22 jromine Exp $";
- #endif
- --- 36,38 ----
- #ifndef lint
- ! static char ident[] = "@(#)$Id: dtimep.lex,v 2.15 1993/02/26 22:07:40 jromine Exp $";
- #endif
- ***************
- *** 42,46 ****
- #include <sys/types.h>
- ! #ifndef SYS5
- #include <sys/timeb.h>
- ! #endif /* not SYS5 */
-
- --- 42,46 ----
- #include <sys/types.h>
- ! #if !defined(SYS5) && !defined(ZONEINFO)
- #include <sys/timeb.h>
- ! #endif /* !defined(SYS5) && !defined(ZONEINFO) */
-
- ***************
- *** 170,173 ****
- #ifndef SYS5
- struct timeb tb;
- ! #endif /* not SYS5 */
- long tclock;
- --- 170,178 ----
- #ifndef SYS5
- + #ifdef ZONEINFO
- + struct tm *tm;
- + time_t clock;
- + #else
- struct timeb tb;
- ! #endif /* ZONEINFO */
- ! #endif /* not SYS5 */
- long tclock;
- ***************
- *** 180,185 ****
- /* Set default time zone. */
- ! #ifndef SYS5
- ! ftime( &tb );
- ! tw.tw_zone = -tb.timezone;
- ! #else /* SYS5 */
- tzset( );
- --- 185,187 ----
- /* Set default time zone. */
- ! #ifdef SYS5
- tzset( );
- ***************
- *** 186,188 ****
- tw.tw_zone = -(timezone / 60);
- ! #endif /* SYS5 */
-
- --- 188,201 ----
- tw.tw_zone = -(timezone / 60);
- ! #else
- ! #ifdef ZONEINFO
- ! time (&clock);
- ! tm = localtime(&clock);
- ! tw.tw_zone = tm->tm_gmtoff / 60;
- ! if (tm -> tm_isdst) /* if DST is in effect */
- ! tw.tw_zone -= 60; /* reset to normal offset */
- ! #else
- ! ftime( &tb );
- ! tw.tw_zone = -tb.timezone;
- ! #endif /* ZONEINFO */
- ! #endif /* SYS5 */
-
- *** /dev/null Fri Aug 20 12:27:17 1993
- --- sbr/ruserpass.c Fri Feb 26 10:58:37 1993
- ***************
- *** 0 ****
- --- 1,216 ----
- + /*
- + * Copyright (c) 1985 Regents of the University of California.
- + * All rights reserved.
- + *
- + * Redistribution and use in source and binary forms are permitted
- + * provided that the above copyright notice and this paragraph are
- + * duplicated in all such forms and that any documentation,
- + * advertising materials, and other materials related to such
- + * distribution and use acknowledge that the software was developed
- + * by the University of California, Berkeley. The name of the
- + * University may not be used to endorse or promote products derived
- + * from this software without specific prior written permission.
- + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- + */
- +
- + #ifndef lint
- + static char sccsid[] = "@(#)ruserpass.c 5.1 (Berkeley) 3/1/89";
- + #endif /* not lint */
- +
- + #include <sys/types.h>
- + #include <sys/stat.h>
- + #include <stdio.h>
- + #include <ctype.h>
- + #include <pwd.h>
- + #include <errno.h>
- +
- + char *malloc(), *index(), *getenv(), *getpass(), *getlogin();
- + char *strcpy();
- + static FILE *cfile;
- +
- + #ifndef MAXHOSTNAMELEN
- + #define MAXHOSTNAMELEN 64
- + #endif
- +
- + #define DEFAULT 1
- + #define LOGIN 2
- + #define PASSWD 3
- + #define ACCOUNT 4
- + #define MACDEF 5
- + #define ID 10
- + #define MACH 11
- +
- + static int token();
- + static char tokval[100];
- +
- + static struct toktab {
- + char *tokstr;
- + int tval;
- + } toktab[]= {
- + "default", DEFAULT,
- + "login", LOGIN,
- + "password", PASSWD,
- + "passwd", PASSWD,
- + "account", ACCOUNT,
- + "machine", MACH,
- + "macdef", MACDEF,
- + 0, 0
- + };
- +
- + ruserpass(host, aname, apass)
- + char *host, **aname, **apass;
- + {
- + char *hdir, buf[BUFSIZ], *tmp;
- + char myname[MAXHOSTNAMELEN], *mydomain;
- + int t, i, c, usedefault = 0;
- + struct stat stb;
- + extern int errno;
- +
- + hdir = getenv("HOME");
- + if (hdir == NULL)
- + hdir = ".";
- + (void) sprintf(buf, "%s/.netrc", hdir);
- + cfile = fopen(buf, "r");
- + if (cfile == NULL) {
- + if (errno != ENOENT)
- + perror(buf);
- + goto done;
- + }
- +
- + while ((t = token())) switch(t) {
- + case DEFAULT:
- + usedefault = 1;
- + /* FALL THROUGH */
- +
- + case MACH:
- + if (!usedefault) {
- + if (token() != ID)
- + continue;
- + /*
- + * Allow match either for user's host name.
- + */
- + if (strcasecmp(host, tokval) == 0)
- + goto match;
- + continue;
- + }
- + match:
- + while ((t = token()) && t != MACH && t != DEFAULT) switch(t) {
- +
- + case LOGIN:
- + if (token() && *aname == 0) {
- + *aname = malloc((unsigned) strlen(tokval) + 1);
- + (void) strcpy(*aname, tokval);
- + }
- + break;
- + case PASSWD:
- + if (fstat(fileno(cfile), &stb) >= 0 &&
- + (stb.st_mode & 077) != 0) {
- + fprintf(stderr, "Error - .netrc file not correct mode.\n");
- + fprintf(stderr, "Remove password or correct mode.\n");
- + goto bad;
- + }
- + if (token() && *apass == 0) {
- + *apass = malloc((unsigned) strlen(tokval) + 1);
- + (void) strcpy(*apass, tokval);
- + }
- + break;
- + case ACCOUNT:
- + break;
- +
- + case MACDEF:
- + goto done_close;
- + break;
- + default:
- + fprintf(stderr, "Unknown .netrc keyword %s\n", tokval);
- + break;
- + }
- + goto done;
- + }
- +
- + done_close:
- + (void) fclose(cfile);
- +
- + done:
- + if (!*aname) {
- + char tmp[80];
- + char *myname;
- +
- + if ((myname = getlogin()) == NULL) {
- + struct passwd *pp;
- +
- + if ((pp = getpwuid (getuid())) != NULL)
- + myname = pp->pw_name;
- + }
- + printf("Name (%s:%s): ", host, myname);
- +
- + (void) fgets(tmp, sizeof(tmp) - 1, stdin);
- + tmp[strlen(tmp) - 1] = '\0';
- + if (*tmp != '\0') {
- + myname = tmp;
- + }
- +
- + *aname = malloc((unsigned) strlen(myname) + 1);
- + strcpy (*aname, myname);
- + }
- +
- + if (!*apass) {
- + char prompt[256];
- + char *mypass;
- +
- + sprintf(prompt, "Password (%s:%s): ", host, *aname);
- + mypass = getpass (prompt);
- +
- + if (*mypass == '\0') {
- + mypass = *aname;
- + }
- +
- + *apass = malloc((unsigned) strlen(mypass) + 1);
- + strcpy (*apass, mypass);
- + }
- +
- + return(0);
- + bad:
- + (void) fclose(cfile);
- + return(-1);
- + }
- +
- + static int
- + token()
- + {
- + char *cp;
- + int c;
- + struct toktab *t;
- +
- + if (feof(cfile))
- + return (0);
- + while ((c = getc(cfile)) != EOF &&
- + (c == '\n' || c == '\t' || c == ' ' || c == ','))
- + continue;
- + if (c == EOF)
- + return (0);
- + cp = tokval;
- + if (c == '"') {
- + while ((c = getc(cfile)) != EOF && c != '"') {
- + if (c == '\\')
- + c = getc(cfile);
- + *cp++ = c;
- + }
- + } else {
- + *cp++ = c;
- + while ((c = getc(cfile)) != EOF
- + && c != '\n' && c != '\t' && c != ' ' && c != ',') {
- + if (c == '\\')
- + c = getc(cfile);
- + *cp++ = c;
- + }
- + }
- + *cp = 0;
- + if (tokval[0] == 0)
- + return (0);
- + for (t = toktab; t->tokstr; t++)
- + if (!strcmp(t->tokstr, tokval))
- + return (t->tval);
- + return (ID);
- + }
- *** ../mh-6.8/miscellany/multi-media/READ-ME Tue Dec 15 08:54:04 1992
- --- miscellany/multi-media/READ-ME Fri Aug 20 08:36:53 1993
- ***************
- *** 257 ****
- --- 257,268 ----
- can fiddle with the volume controls whenever you like.
- +
- +
- + video
- +
- + If you are running the X window system, you can use the mpeg_play
- + program to display a video/mpeg content.
- +
- + host toe.cs.berkeley.edu
- + dir pub/multimedia/mpeg/
- + file mpeg-2.0.tar.Z
- + mode binary
- *** /dev/null Fri Aug 20 12:27:17 1993
- --- miscellany/multi-media/misc/mail-server.sh Fri Aug 20 08:36:55 1993
- ***************
- *** 0 ****
- --- 1,221 ----
- + : run this script through /bin/sh
- +
- + PERSON="$1" SERVER="$2" AREA="$3"
- + export PERSON
- +
- + if [ -z "$PERSON" -o -z "$SERVER" -o -z "$AREA" -o ! -d "$AREA" ]; then
- + exit 1
- + fi
- +
- + GAWK="/usr/local/bin/gawk"
- + MHL="/usr/local/lib/mh/mhl -nobell"
- + MHMAIL="/usr/local/bin/mhmail"
- + SCAN="/usr/local/bin/scan -width 512"
- + MHN="/usr/local/bin/mhn"
- + SEND="/usr/local/bin/send"
- + FILE="/usr/bin/file"
- + VIAMAIL="/usr/local/lib/mh/viamail"
- + PATH=$PATH:/etc:/bin:/usr/ucb:/usr/bin:/usr/local/bin export PATH
- + if [ date +"%m/%d %T" > /dev/null 2>&1 ]; then
- + DATE="date +\"%m/%d %T\" | tr '\012' ' '"
- + else
- + DATE="date | ${GAWK} '{ printf \"%s %s %s \", \$2, \$3, \$4 }'"
- + fi
- +
- + P=/tmp/mail$$.prf C=/tmp/mail$$.ctx F=/tmp/mail$$ Z=/tmp/mail$$.log
- + M=1 N=2
- + trap "rm -rf $P $C $F $Z" 0 1 2 3 13 15
- +
- + cd /tmp
- + umask 0022
- +
- + echo "Path: /tmp" > $P
- + MH="$P" export MH
- +
- + echo "Current-Folder: $F" > $C
- + MHCONTEXT="$C" export MHCONTEXT
- +
- + mkdir $F
- + chmod 700 $F
- + sed -e 1d > $F/$M
- +
- + FROM=`$SCAN -format "%<{reply-to}%{reply-to}%|%<{from}%{from}%|%<{sender}%{sender}%|%<{return-path}%{return-path}%>%>%>%>" $M`
- +
- + SUBJECT=`$SCAN -format "%{subject}" $M | tr A-Z a-z`
- +
- + cd $AREA
- +
- + W="`whoami`"
- + STAMP="`echo $SERVER $$ $W | $GAWK '{ printf \"%-8.8s %05d (%-8s)\", $1, $2, $3; }'`"
- +
- + (eval ${DATE}) > $Z
- + echo "$STAMP" BEGIN "$FROM" "$SUBJECT" >> $Z
- + cat $Z >> /var/tmp/mail-server.log
- +
- + $MHL -form mhl.body < $F/$M | while read directive
- + do
- + cmd="`echo "$directive" | sed -e s'%\([A-Za-z0-9-]*\).*%\1%' | tr A-Z a-z`"
- + if [ -z "$cmd" ]; then
- + continue
- + fi;
- +
- + (eval ${DATE}) > $Z
- + echo "$STAMP" "$directive" >> $Z
- + cat $Z >> /var/tmp/mail-server.log
- +
- + arg="`echo $directive | sed -e 's%[A-Za-z0-9-]*[ ]*\(.*\)[ ]*%\1%'`"
- + case "$cmd" in
- + path) if [ -z "$arg" ]; then
- + (eval ${DATE}) > $Z
- + echo "$STAMP" "path command requires argument" >> $Z
- + cat $Z >> /var/tmp/mail-server.log
- +
- + $MHMAIL "$FROM" -subject "Re: $SUBJECT ($directive)" \
- + -from "$PERSON" -cc "$PERSON" \
- + -body "path command requires argument"
- + else
- + FROM="$arg"
- + continue
- + fi
- + ;;
- +
- + send) for P in $arg; do
- + if echo "$P" | egrep -s "\.\./|^/"; then
- + (eval ${DATE}) > $Z
- + echo "$STAMP" "$P: invalid package" >> $Z
- + cat $Z >> /var/tmp/mail-server.log
- +
- + $MHMAIL "$FROM" -subject "Re: $SUBJECT ($directive)" \
- + -from "$PERSON" -cc "$PERSON" \
- + -body "$P: invalid package"
- +
- + break 2
- + fi
- + if [ ! -s "$P" ]; then
- + (eval ${DATE}) > $Z
- + echo "$STAMP" "$P: no such package" >> $Z
- + cat $Z >> /var/tmp/mail-server.log
- +
- + $MHMAIL "$FROM" -subject "Re: $SUBJECT ($directive)" \
- + -from "$PERSON" -cc "$PERSON" \
- + -body "$P: no such package"
- +
- +
- + break 2
- + fi
- + T="`${FILE} $P | ${GAWK} '{ print $2; }`"
- + if [ ! \( "$T" = "ascii" -o "$T" = "English" \) ]; then
- + (case $P in
- + *.tar.Z)
- + cat $P
- + ;;
- + *.tar)
- + compress -c $P
- + ;;
- + *)
- + tar cvf - $P | compress -c
- + ;;
- + esac) | ${MHN} -viamail "$FROM" -viasubj "Re: $SUBJECT ($directive)" \
- + -viaparm "type=tar; conversions=x-compress" \
- + -viacmnt "extract with uncompress | tar xvpf -" \
- + -viadelay 180 \
- + -verbose "$PERSON"
- + if [ $? -eq 0 ]; then
- + true
- + else
- + (eval ${DATE}) > $Z
- + echo "$STAMP" "error sending viamail" >> $Z
- + cat $Z >> /var/tmp/mail-server.log
- +
- + $MHMAIL "$FROM" \
- + -subject "Re: $SUBJECT ($directive)" \
- + -from "$PERSON" -cc "$PERSON" \
- + -body "error sending viamail"
- + fi
- + else
- + echo "\
- + To: $FROM
- + Subject: Re: $SUBJECT ($directive)
- + From: $PERSON
- +
- + #text/plain [] $P
- + " > $F/$N
- + if mhdraft=$F/$N $MHN $F/$N; then
- + if $SEND -draftf +$F -draftm $N -split 180; then
- + true
- + else
- + (eval ${DATE}) > $Z
- + echo "$STAMP" "error sending draft" >> $Z
- + cat $Z >> /var/tmp/mail-server.log
- +
- + $MHMAIL "$FROM" \
- + -subject "Re: $SUBJECT ($directive)" \
- + -from "$PERSON" -cc "$PERSON" \
- + -body "error sending draft"
- + fi
- + else
- + (eval ${DATE}) > $Z
- + echo "$STAMP" "error generating draft" >> $Z
- + cat $Z >> /var/tmp/mail-server.log
- +
- + $MHMAIL "$FROM" \
- + -subject "Re: $SUBJECT ($directive)" \
- + -from "$PERSON" -cc "$PERSON" \
- + -body "error generating draft"
- + fi
- + fi
- + done
- + continue
- + ;;
- +
- + dir) if echo "$arg" | egrep -s "\.\./|^/"; then
- + (eval ${DATE}) > $Z
- + echo "$STAMP" "$arg: invalid package" >> $Z
- + cat $Z >> /var/tmp/mail-server.log
- +
- + $MHMAIL "$FROM" -subject "Re: $SUBJECT ($directive)" \
- + -from "$PERSON" -cc "$PERSON" \
- + -body "$arg: invalid package"
- + else
- + /bin/ls -alg $arg | \
- + $MHMAIL "$FROM" -subject "Re: $SUBJECT ($directive)" \
- + -from "$PERSON"
- + continue
- + fi
- + ;;
- +
- + help) if [ -s Help ]; then
- + $MHMAIL "$FROM" -subject "Re: $SUBJECT ($directive)" \
- + -from "$PERSON" < Help
- + else
- + (eval ${DATE}) > $Z
- + echo "$STAMP" "no help available, please try later" >> $Z
- + cat $Z >> /var/tmp/mail-server.log
- +
- + $MHMAIL "$FROM" -subject "Re: $SUBJECT ($directive)" \
- + -from "$PERSON" -cc "$PERSON" \
- + -body "no help available, please try later"
- + fi
- + continue
- + ;;
- +
- + exit|end)
- + ;;
- +
- + *) (eval ${DATE}) > $Z
- + echo "$STAMP" "invalid directive: $directive" >> $Z
- + cat $Z >> /var/tmp/mail-server.log
- +
- + $MHMAIL "$FROM" -subject "Re: $SUBJECT ($directive)" \
- + -from "$PERSON" -cc "$PERSON" \
- + -body "invalid directive: $directive"
- + ;;
- + esac
- + break
- + done
- +
- + (eval ${DATE}) > $Z
- + echo "$STAMP" DONE >> $Z
- + cat $Z >> /var/tmp/mail-server.log
- +
- + exit 0
- *** /dev/null Fri Aug 20 12:27:17 1993
- --- miscellany/multi-media/misc/mimeplay.sh Fri Aug 20 08:36:56 1993
- ***************
- *** 0 ****
- --- 1,13 ----
- + #!/bin/sh -f
- +
- + P=/tmp/mime$$.mhn Q=/tmp/mime$$.sh
- +
- + cat > $P
- +
- + echo "trap \"rm -f $P $Q\" 0 1 2 3 13 15" > $Q
- + echo "mhn -file $P -show" >> $Q
- + echo "echo -n \"Press <return> to continue... \"" >> $Q
- + echo "read x" >> $Q
- + chmod +x $Q
- +
- + (xterm -e $Q >/dev/null 2>&1 &) &
- *** /dev/null Fri Aug 20 12:27:17 1993
- --- miscellany/multi-media/misc/showmime.tcl Fri Aug 20 08:36:57 1993
- ***************
- *** 0 ****
- --- 1,108 ----
- + #!/usr/local/bin/wish -f
- +
- + if {$argc != 1} {
- + puts stdout "usage: showmime.tcl fileName"
- + exit 1
- + }
- +
- + set bodyParts ""
- + set fileName [lindex $argv 0]
- + set maxX [expr [winfo screenwidth .]*5/12]
- + set maxY [expr [winfo screenheight .]*2/3]
- + set nextX 0
- + set nextY 0
- +
- +
- + proc main {w} {
- + global bodyParts fileName
- +
- + set list [exec mhn -list -file "$fileName"]
- + set lines [split "$list" "\n"]
- +
- + frame $w.frame -borderwidth 10
- +
- + pack append $w.frame [label $w.frame.label \
- + -font -*courier-medium-r-normal-*-120-* \
- + -relief sunken \
- + -text "part type/subtype size description "] \
- + {top fillx}
- + catch { $w.frame.label configure -background lightskyblue }
- + if {[set nline [expr [llength $lines]-1]] > 10} {
- + pack append $w.frame [scrollbar $w.frame.yscroll \
- + -command "$w.frame.list yview" \
- + -orient vertical \
- + -relief sunken] \
- + {right filly}
- + set y 10
- + } else {
- + set y $nline
- + }
- + pack append $w.frame [listbox $w.frame.list \
- + -font -*courier-medium-r-normal-*-120-* \
- + -geometry 73x$y \
- + -relief sunken] \
- + {top expand}
- + if {$nline > 10} {
- + $w.frame.list configure -yscroll "$w.frame.yscroll set"
- + }
- + catch { $w.frame.list configure -background lightskyblue }
- +
- + set part ""
- + for {set i 1; set j [llength $lines]} {$i<$j} {incr i} {
- + set line [string range [lindex $lines $i] 5 end]
- + if {[string index "$line" 0] != " "} {
- + set part [string range "$line" 0 \
- + [expr [string first " " "$line"]-1]]
- + }
- + lappend bodyParts "$part"
- + if {$i == 1} {
- + set line "all [string range "$line" 5 end]"
- + }
- + $w.frame.list \
- + insert end "$line"
- + }
- +
- + bind $w.frame.list <1> {%W select from [%W nearest %y]}
- + bind $w.frame.list <B1-Motion>\
- + {%W select to [%W nearest %y]}
- + bind $w.frame.list <Shift-1> \
- + {%W select adjust [%W nearest %y]}
- + bind $w.frame.list <Shift-B1-Motion> \
- + {%W select to [%W nearest %y]}
- + bind $w.frame.list <Double-1> \
- + "ShowCommand $w.frame.list"
- +
- + frame $w.bot -borderwidth 1
- + pack append $w.bot [button $w.bot.button \
- + -command "destroy ." \
- + -text Dismiss] \
- + {top padx 5 pady 5 expand}
- +
- + pack append . $w.frame \
- + {top expand filly} \
- + $w.bot \
- + {bottom fill}
- + }
- +
- + proc ShowCommand {w} {
- + global bodyParts fileName maxX maxY nextX nextY
- +
- + foreach i [$w curselection] {
- + if {[set part [lindex $bodyParts $i]] != ""} {
- + exec xterm -geometry =80x20+$nextX+$nextY -e \
- + mhn -cache always -form mhl.null -nolist -nopause -show -part "$part" -file "$fileName" &
- + } else {
- + exec xterm -geometry =80x20+$nextX+$nextY -e \
- + mhn -cache always -form mhl.null -nolist -nopause -show -file "$fileName" &
- + }
- + if {[set nextX [expr $nextX+90]] > $maxX} {
- + set nextX 0
- + }
- + if {[set nextY [expr $nextY+60]] > $maxY} {
- + set nextY 0
- + }
- + }
- + $w select clear
- + }
- +
- + main ""
- *** ../mh-6.8/miscellany/multi-media/misc/showtimes.sh Tue Dec 15 08:54:05 1992
- --- miscellany/multi-media/misc/showtimes.sh Fri Aug 20 08:36:57 1993
- ***************
- *** 70,72 ****
- -title "$O (part $A of $N$M)" -e \
- ! mhn -nolist -show -part "$A" $F $M &
-
- --- 70,72 ----
- -title "$O (part $A of $N$M)" -e \
- ! mhn -cache always -form mhl.null -nolist -nopause -show -part "$A" $F $M &
-
- *** ../mh-6.8/miscellany/multi-media/profiles/mhn_defaults Tue Dec 15 08:54:05 1992
- --- miscellany/multi-media/profiles/mhn_defaults Fri Aug 20 08:36:58 1993
- ***************
- *** 1,5 ****
- - mhn-compose-audio/basic: /usr/demo/SOUND/record | /usr/demo/SOUND/raw2audio -F
- - mhn-compose-audio/x-next: /usr/demo/SOUND/record | /usr/openwin/bin/adpcm_enc
- mhn-charset-iso-8859-1: xterm -fn '-*-*-medium-r-normal-*-*-120-*-*-c-*-iso8859-*' -e %s
- mhn-show-application/PostScript: %plpr -Pps
- mhn-show-audio/basic: %p/usr/demo/SOUND/raw2audio 2>/dev/null | play
- --- 1,6 ----
- mhn-charset-iso-8859-1: xterm -fn '-*-*-medium-r-normal-*-*-120-*-*-c-*-iso8859-*' -e %s
- + mhn-compose-audio/basic: /usr/openwin/bin/audiotool %f && /usr/demo/SOUND/raw2audio -F < %f
- + mhn-compose-audio/x-next: /usr/openwin/bin/audiotool %f && /usr/openwin/bin/adpcm_enc < %f
- mhn-show-application/PostScript: %plpr -Pps
- + mhn-show-application/x-ivs: %pivs_replay -o '%F'
- mhn-show-audio/basic: %p/usr/demo/SOUND/raw2audio 2>/dev/null | play
- ***************
- *** 6,9 ****
- mhn-show-audio/x-next: %p/usr/openwin/bin/adpcm_dec | /usr/demo/SOUND/play
- ! mhn-show-image: %pxv -geometry =-0+0 %f
- ! mhn-show-text/richtext: %p/usr/local/lib/mh/richtext -p %F
- mhn-store-application/PostScript: %m%P.ps
- --- 7,12 ----
- mhn-show-audio/x-next: %p/usr/openwin/bin/adpcm_dec | /usr/demo/SOUND/play
- ! mhn-show-image: %pxv -geometry =-0+0 '%f'
- ! mhn-show-text/richtext: %p/usr/local/lib/mh/richtext -p '%F'
- ! mhn-show-text/x-richtext: %pwish -file /usr/local/lib/mh/richtext.tcl < '%f'
- ! mhn-show-video/mpeg: %pmpeg_play '%f'
- mhn-store-application/PostScript: %m%P.ps
- ***************
- *** 12 ****
- --- 15,17 ----
- mhn-store-text: %m%P.txt
- + mhn-store-text/richtext: %m%P.rt
- + mhn-store-video/mpeg: %m%P.mpg
- *** ../mh-6.8/miscellany/multi-media/profiles/mtr.mh_profile Tue Dec 15 08:54:06 1992
- --- miscellany/multi-media/profiles/mtr.mh_profile Fri Aug 20 08:36:59 1993
- ***************
- *** 30,33 ****
- -whatnow push
- - oops: -annotate -fcc +outbox -form repl.oops -inplace -nocc all
- - -whatnow push
- pick: -sequence select -list
- --- 30,31 ----
- ***************
- *** 37,39 ****
- prev: -noheader
- ! push: -alias aliases -forward -mime -msgid -push -verbose
- pushf: -push
- --- 35,37 ----
- prev: -noheader
- ! push: -alias aliases -forward -mime -msgid -push -split 0 -verbose
- pushf: -push
- ***************
- *** 42,45 ****
- scan: -form scan.time
- ! send: -alias aliases -mime -msgid -verbose
- ! sendf: -alias aliases -mime -msgid -verbose -draftfolder +drafts
- show: -noheader
- --- 40,44 ----
- scan: -form scan.time
- ! send: -alias aliases -mime -msgid -split 0 -verbose
- ! sendf: -alias aliases -mime -msgid -split 0 -verbose
- ! -draftfolder +drafts
- show: -noheader
- ***************
- *** 48,49 ****
- --- 47,50 ----
- -whatnow push
- + tpcfaq: -annotate -fcc +outbox -form repl.tpcfaq -inplace -nocc all
- + -whatnow push
- whom: -alias aliases
- ***************
- *** 52,54 ****
- -whatnow push
- - Split-Delay: 180
- automhnproc: mhn
- --- 53,54 ----
- ***************
- *** 56,58 ****
- mcomp: -editor rapid -form comp.mhn
- ! mhn: -list -nomoreproc
- mhn-cache: /tmp
- --- 56,58 ----
- mcomp: -editor rapid -form comp.mhn
- ! mhn: -cache always -list -nomoreproc
- mhn-cache: /tmp
- ***************
- *** 59 ****
- --- 59,62 ----
- mhn-storage: /tmp
- + mhn-show-application/remote-printing: cat
- + mhn-store-application/remote-printing: %m%P.rp
- + rpprompter: -noprepend -rapid
- *** ../mh-6.8/miscellany/multi-media/profiles/mtr.mhn_profile.openwindows Tue Dec 15 08:54:06 1992
- --- miscellany/multi-media/profiles/mtr.mhn_profile.openwindows Fri Aug 20 08:36:59 1993
- ***************
- *** 1 ****
- ! mhn-show-application/PostScript: pageview -
- --- 1,2 ----
- ! mhn-show-application/PostScript: gs -q -dSAFER -- %F
- ! mhn-store-message/rfc822: %m%P.msg
- *** ../mh-6.8/miscellany/multi-media/profiles/mtr.mhn_profile.xterminal Tue Dec 15 08:54:06 1992
- --- miscellany/multi-media/profiles/mtr.mhn_profile.xterminal Fri Aug 20 08:37:00 1993
- ***************
- *** 0 ****
- --- 1,7 ----
- + mhn-compose-audio/basic:
- + mhn-compose-audio/x-next:
- + mhn-show-audio/basic:
- + mhn-show-audio/x-next:
- + mhn-show-application/PostScript:
- + mhn-store-audio/basic:
- + mhn-store-audio/x-next:
- *** /dev/null Fri Aug 20 12:27:17 1993
- --- miscellany/multi-media/richtext.tcl Fri Aug 20 08:37:01 1993
- ***************
- *** 0 ****
- --- 1,210 ----
- + #! /usr/local/bin/wish -f
- +
- +
- + proc richtext {{w .richtext}} {
- + catch {destroy $w}
- + toplevel $w
- + wm title $w "Richtext"
- + wm iconname $w "rt"
- +
- + text $w.text -borderwidth 2 \
- + -height 34 \
- + -relief raised \
- + -setgrid true \
- + -width 80 \
- + -wrap word \
- + -yscrollcommand "$w.scroll set"
- + scrollbar $w.scroll -command "$w.text yview" \
- + -relief flat
- + frame $w.bot -borderwidth 1
- + pack append $w.bot [button $w.bot.button \
- + -command "destroy $w;destroy ." \
- + -text Dismiss] \
- + {top padx 5 pady 5 expand}
- +
- + pack append $w $w.bot \
- + {bottom fillx} \
- + $w.scroll \
- + {right filly} \
- + $w.text \
- + {expand fill}
- +
- + $w.text tag configure bold \
- + -font -*-courier-bold-r-normal-*-120-*
- + $w.text tag configure italic \
- + -font -*-courier-medium-o-normal-*-120-*
- + $w.text tag configure bolditalic \
- + -font -*-courier-bold-o-normal-*-120-*
- + $w.text tag configure fixed \
- + -font -*-courier-medium-r-normal-*-120-*
- +
- + $w.text tag configure bigbold \
- + -font -*-courier-bold-r-normal-*-140-*
- + $w.text tag configure bigitalic \
- + -font -*-courier-medium-o-normal-*-140-*
- + $w.text tag configure bigbolditalic \
- + -font -*-courier-bold-o-normal-*-140-*
- + $w.text tag configure bigfixed \
- + -font -*-courier-medium-r-normal-*-140-*
- +
- + $w.text tag configure smallbold \
- + -font -*-courier-bold-r-normal-*-100-*
- + $w.text tag configure smallitalic \
- + -font -*-courier-medium-o-normal-*-100-*
- + $w.text tag configure smallbolditalic \
- + -font -*-courier-bold-o-normal-*-100-*
- + $w.text tag configure smallfixed \
- + -font -*-courier-medium-r-normal-*-100-*
- +
- + $w.text tag configure underline \
- + -underline on
- +
- +
- + set env(bold) 0
- + set env(italic) 0
- + set env(fixed) 0
- + set env(smaller) 0
- + set env(bigger) 0
- + set env(underline) 0
- +
- + set env(center) 0
- + set env(flushleft) 0
- + set env(flushright) 0
- + set env(indent) 0
- + set env(indentright) 0
- + set env(outdent) 0
- + set env(outdentright) 0
- + set env(samepage) 0
- + set env(superscript) 0
- + set env(subscript) 0
- + set env(heading) 0
- + set env(footing) 0
- + set env(excerpt) 0
- + set env(paragraph) 0
- + set env(signature) 0
- +
- + set intoken 0
- + set token ""
- +
- + set incomment 0
- +
- + set output ""
- + set lasto " "
- +
- +
- + while {[set len [gets stdin buffer]] > -1} {
- + if {(!$intoken) && ($lasto != " ")} {
- + append output [set lasto " "]
- + }
- +
- + for {set i 0} {$i < $len} {incr i} {
- + set c [string index $buffer $i]
- + if {$intoken} {
- + if {([string length $token] == 0) && ($c == "/")} {
- + set intoken -1
- + continue
- + }
- + if {$c != ">"} {
- + append token $c
- + continue
- + }
- +
- + set command [string tolower $token]
- + set pos $intoken
- +
- + set intoken 0
- + set token ""
- +
- + if {$command == "comment"} {
- + if {[incr incomment $pos] < 0} {
- + set incomment 0
- + }
- + if {$incomment > 0} { continue }
- + }
- +
- + if {$command == "lt"} {
- + append output [set lasto "<"]
- + continue
- + }
- + if {($command == "nl") || ($command == "np")} {
- + append output "\n"
- + set lasto " "
- + continue
- + }
- +
- + if {[string length $output]} {
- + set size [expr $env(bigger)-$env(smaller)]
- + if {$size > 0} {
- + set font "big"
- + } else {
- + if {$size < 0} {
- + set font "small"
- + } else {
- + set font ""
- + }
- + }
- + if {$env(fixed) > 0} {
- + append font "fixed"
- + } else {
- + if {$env(bold) > 0} {
- + append font "bold"
- + }
- + if {$env(italic) > 0} {
- + append font "italic"
- + }
- + }
- + set tags [list $font]
- + if {$env(underline) > 0} {
- + append tags underline
- + }
- +
- + insertWithTags $w.text $output $tags
- +
- + set output ""
- + set lasto " "
- + }
- +
- + catch {
- + if {[incr env($command) $pos] < 0} {
- + set $env($command) 0
- + }
- + }
- + continue
- + }
- +
- + if {$c != "<"} {
- + if {!$incomment} {
- + append output [set lasto $c]
- + }
- + continue
- + }
- +
- + set intoken 1
- + }
- + }
- +
- + insertWithTags $w.text $output
- + }
- +
- + # The procedure below inserts text into a given text widget and
- + # applies one or more tags to that text. The arguments are:
- + #
- + # w Window in which to insert
- + # text Text to insert (it's inserted at the "insert" mark)
- + # args One or more tags to apply to text. If this is empty
- + # then all tags are removed from the text.
- +
- + proc insertWithTags {w text args} {
- + set start [$w index insert]
- + $w insert insert $text
- + foreach tag [$w tag names $start] {
- + $w tag remove $tag $start insert
- + }
- + foreach i $args {
- + $w tag add $i $start insert
- + }
- + }
- +
- +
- + richtext
- + wm withdraw .
-